[Lada-commits] [PATCH 1 of 2] Serialize empty solldatum values to 'null'
Wald Commits
scm-commit at wald.intevation.org
Fri Sep 11 14:33:43 CEST 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1441974791 -7200
# Node ID a1783726d43e6e956e8630e23e76c557105b75fd
# Parent c75f13578315324c8b13d80891840039f6b68ca1
Serialize empty solldatum values to 'null'.
diff -r c75f13578315 -r a1783726d43e app/model/Probe.js
--- 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',
More information about the Lada-commits
mailing list