changeset 432:f4185f2d1a7c

Only load verwaltungseinheit if there is a selected ort.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 08 Nov 2013 12:54:48 +0100
parents 2375e7247523
children f894b9ab99fa
files app/view/orte/CreateForm.js
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/orte/CreateForm.js	Fri Nov 08 12:47:19 2013 +0100
+++ b/app/view/orte/CreateForm.js	Fri Nov 08 12:54:48 2013 +0100
@@ -28,9 +28,11 @@
                         // would only display the raw value (id) of the
                         // verwaltungseinheit.
                         var verw = Ext.getStore('Verwaltungseinheiten');
-                        verw.load({
-                            id: ort.get('gemId')
-                        });
+                        if (ort) {
+                            verw.load({
+                                id: ort.get('gemId')
+                            });
+                        }
 
                         var form = this.getForm();
                         if ( ort != undefined ) {

http://lada.wald.intevation.org