changeset 1238:aaab7ca3c040

An empty string is only one time a valid idAlt.
author Tom Gottfried <tom@intevation.de>
date Tue, 01 Nov 2016 12:49:59 +0100
parents 8567d14dfc9d
children 1ed5ec9326e6
files app/model/Probe.js
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/model/Probe.js	Mon Oct 31 17:13:41 2016 +0100
+++ b/app/model/Probe.js	Tue Nov 01 12:49:59 2016 +0100
@@ -20,7 +20,13 @@
         type: 'boolean',
         persist: false
     }, {
-        name: 'idAlt'
+        name: 'idAlt',
+        serialize: function(value) {
+            if (value === '') {
+                return null;
+            }
+            return value;
+        }
     }, {
         name: 'hauptprobenNr'
     }, {

http://lada.wald.intevation.org