[Lada-commits] [PATCH 2 of 2] merged

Wald Commits scm-commit at wald.intevation.org
Tue Mar 24 11:58:45 CET 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1427195739 -3600
# Node ID 31fc4f94f98fa82a4721e7860506721b33ce183a
# Parent  60a3e9809ea4a7404a8d6dc01e9442502b77d0a4
# Parent  a24db43b13b5954935dd9fbdf6ab6e9dcf2de6cb
merged

diff -r 60a3e9809ea4 -r 31fc4f94f98f app/controller/form/Probe.js
--- a/app/controller/form/Probe.js	Tue Mar 24 12:07:35 2015 +0100
+++ b/app/controller/form/Probe.js	Tue Mar 24 12:15:39 2015 +0100
@@ -53,7 +53,9 @@
                 button.setDisabled(true);
                 button.up('toolbar').down('button[action=discard]')
                     .setDisabled(true);
-                formPanel.getForm().loadRecord(formPanel.getForm().getRecord());
+                var rec = formPanel.getForm().getRecord();
+                rec.dirty = false;
+                formPanel.getForm().loadRecord(rec);
                 var json = response.request.scope.reader.jsonData;
                 if (json) {
                     formPanel.setMessages(json.errors, json.warnings);
diff -r 60a3e9809ea4 -r 31fc4f94f98f app/model/Probe.js
--- a/app/model/Probe.js	Tue Mar 24 12:07:35 2015 +0100
+++ b/app/model/Probe.js	Tue Mar 24 12:15:39 2015 +0100
@@ -22,7 +22,13 @@
     }, {
         name: 'test'
     }, {
-        name: 'netzbetreiberId'
+        name: 'netzbetreiberId',
+        serialize: function(value) {
+            if (value === '') {
+                return null;
+            }
+            return value;
+        }
     }, {
         name: 'mstId'
     }, {
@@ -36,7 +42,13 @@
     }, {
         name: 'media'
     }, {
-        name: 'umwId'
+        name: 'umwId',
+        serialize: function(value) {
+            if (value === '') {
+                return null;
+            }
+            return value;
+        }
     }, {
         name: 'probeentnahmeBeginn',
         type: 'date',


More information about the Lada-commits mailing list