changeset 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 (2017-02-17)
parents e95ac7584c2c
children 12ffe66a6786
files app/view/window/Ortszuordnung.js
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
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