[Lada-commits] [PATCH] Fixed saving messprogramm

Wald Commits scm-commit at wald.intevation.org
Tue Nov 15 10:50:18 CET 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1479203414 -3600
# Node ID 5824c4b329f4a4edd3ff9430392b67aa8ec9a907
# Parent  979b4b9200a7bfd471981e0e8108035991701417
Fixed saving messprogramm.

diff -r 979b4b9200a7 -r 5824c4b329f4 app/controller/form/Messprogramm.js
--- a/app/controller/form/Messprogramm.js	Thu Nov 10 14:44:29 2016 +0100
+++ b/app/controller/form/Messprogramm.js	Tue Nov 15 10:50:14 2016 +0100
@@ -202,7 +202,10 @@
         var formPanel = button.up('form');
         var data = formPanel.getForm().getFieldValues();
         var orte = Ext.data.StoreManager.get('orte');
-        var gemId = orte.getById(data['ortId']).get('gemId');
+        var gemId;
+        if (data['ortId'] !== null && data['ortId'] !== '') {
+            gemId = orte.getById(data['ortId']).get('gemId');
+        }
         for (var key in data) {
             formPanel.getForm().getRecord().set(key, data[key]);
         }


More information about the Lada-commits mailing list