diff app/model/Probe.js @ 927:a1783726d43e

Serialize empty solldatum values to 'null'.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 11 Sep 2015 14:33:11 +0200
parents c75f13578315
children f4eb53ba63fc
line wrap: on
line diff
--- a/app/model/Probe.js	Fri Sep 11 14:18:52 2015 +0200
+++ b/app/model/Probe.js	Fri Sep 11 14:33:11 2015 +0200
@@ -104,6 +104,12 @@
                 return v;
             }
             return new Date(v);
+        },
+        serialize: function(value) {
+            if (value === '') {
+                return null;
+            }
+            return value;
         }
     }, {
         name: 'solldatumEnde',
@@ -113,6 +119,12 @@
                 return v;
             }
             return new Date(v);
+        },
+        serialize: function(value) {
+            if (value === '') {
+                return null;
+            }
+            return value;
         }
     }, {
         name: 'readonly',

http://lada.wald.intevation.org