diff app/view/window/Ortszuordnung.js @ 1380:6ccaeeeb41ad

Fixed Ortszuordnung in case netzbetreiber owns no Ort
author Maximilian Krambach <mkrambach@intevation.de>
date Fri, 17 Feb 2017 12:05:30 +0100
parents e95ac7584c2c
children 954c77216b2d
line wrap: on
line diff
--- a/app/view/window/Ortszuordnung.js	Tue Feb 14 14:30:15 2017 +0100
+++ b/app/view/window/Ortszuordnung.js	Fri Feb 17 12:05:30 2017 +0100
@@ -191,7 +191,10 @@
         } else {
             ortId = this.record.get('ortId');
         }
-        if (ortId !== undefined && !this.ortstore.findRecord('id', ortId)) {
+        if (ortId !== undefined
+            && ortId !== ''
+            && ortId !== null
+            && !this.ortstore.findRecord('id', ortId)) {
             var record = Ext.create('Lada.model.Ort');
             record.set('id', ortId);
             this.ortstore.add(record);

http://lada.wald.intevation.org