changeset 1394:76ff6d084167

Do not load Ortszuordnung for messprogramm in "new messprogramm" dialog
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 09 Mar 2017 15:37:19 +0100
parents 7cf7a8dc7818
children f428b7d8f19b
files app/view/grid/Ortszuordnung.js
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/grid/Ortszuordnung.js	Wed Mar 08 16:00:48 2017 +0100
+++ b/app/view/grid/Ortszuordnung.js	Thu Mar 09 15:37:19 2017 +0100
@@ -184,12 +184,18 @@
         var modelname;
         if (this.isMessprogramm) {
             this.store = Ext.create('Lada.store.OrtszuordnungMp');
-            this.store.load({
-                params: {
-                    messprogrammId: this.recordId
-                }});
-            modelname = 'Lada.model.Messprogramm';
-        } else {
+            if (this.recordId) {
+                this.store.load({
+                    params: {
+                        messprogrammId: this.recordId
+                    }});
+                modelname = 'Lada.model.Messprogramm';
+            }
+            else {
+                return;
+            }
+        }
+        else {
             modelname = 'Lada.model.Probe';
             this.store = Ext.create('Lada.store.Ortszuordnung');
             this.store.load({

http://lada.wald.intevation.org