diff app/model/Ort.js @ 1309:1bcc3a62e909

insert and preset OrtId field on Orterstellung
author Maximilian Krambach <mkrambach@intevation.de>
date Thu, 02 Feb 2017 16:59:25 +0100
parents bfdc00c24baf
children 1a2cd9bef6d7
line wrap: on
line diff
--- a/app/model/Ort.js	Thu Feb 02 16:43:53 2017 +0100
+++ b/app/model/Ort.js	Thu Feb 02 16:59:25 2017 +0100
@@ -17,7 +17,13 @@
     }, {
         name: 'aktiv'
     }, {
-        name: 'ortId'
+        name: 'ortId',
+        convert: function(v) {
+            if (v === '') {
+                return null;
+            }
+            return v;
+        }
     }, {
         name: 'nutsCode'
     }, {

http://lada.wald.intevation.org