diff app/model/Ort.js @ 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 143ab8fa13dc
children faecbb446a04
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