[Lada-commits] [PATCH] An empty string is only one time a valid idAlt

Wald Commits scm-commit at wald.intevation.org
Tue Nov 1 12:50:11 CET 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1478000999 -3600
# Node ID aaab7ca3c04048474b678705a1ae0c416ccfc1ee
# Parent  8567d14dfc9d6e6e189e4857a056b09fdce70592
An empty string is only one time a valid idAlt.

diff -r 8567d14dfc9d -r aaab7ca3c040 app/model/Probe.js
--- 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'
     }, {


More information about the Lada-commits mailing list