changeset 1253:2caaaa690e17

Empty string is not a valid ozId.
author Tom Gottfried <tom@intevation.de>
date Fri, 18 Nov 2016 13:25:12 +0100
parents 5db7e8abfd61
children 6321530e640e
files app/model/Ort.js
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/model/Ort.js	Thu Nov 17 11:11:00 2016 +0100
+++ b/app/model/Ort.js	Fri Nov 18 13:25:12 2016 +0100
@@ -31,7 +31,13 @@
     }, {
         name: 'kdaId'
     }, {
-        name: 'ozId'
+        name: 'ozId',
+        serialize: function(v) {
+            if (v === '') {
+                return null;
+            }
+            return v;
+        }
     }, {
         name: 'ortTyp'
     }, {

http://lada.wald.intevation.org