changeset 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 e2a26f9733ee
files app/model/Probe.js
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
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