[Lada-commits] [PATCH 2 of 4] Updated the model to have correct tree_modified value and parent_modified
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 8 10:52:11 CEST 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1428483099 -7200
# Node ID af16a257d5f6f56ecdfeeeb3ae222e949ab9d8a2
# Parent f204f30b824a03bfeb7ef51a21276bb95b55fba4
Updated the model to have correct tree_modified value and parent_modified
fields.
diff -r f204f30b824a -r af16a257d5f6 app/model/Messung.js
--- a/app/model/Messung.js Wed Apr 08 10:50:33 2015 +0200
+++ b/app/model/Messung.js Wed Apr 08 10:51:39 2015 +0200
@@ -57,7 +57,21 @@
}, {
name: 'messungsIdAlt'
}, {
- name: 'treeModified'
+ name: 'treeModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
+ }, {
+ name: 'parentModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
}],
idProperty: 'id',
diff -r f204f30b824a -r af16a257d5f6 app/model/Messwert.js
--- a/app/model/Messwert.js Wed Apr 08 10:50:33 2015 +0200
+++ b/app/model/Messwert.js Wed Apr 08 10:51:39 2015 +0200
@@ -52,7 +52,21 @@
},
defaultValue: new Date()
}, {
- name: 'treeModified'
+ name: 'treeModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
+ }, {
+ name: 'parentModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
}],
idProperty: 'id',
diff -r f204f30b824a -r af16a257d5f6 app/model/Ort.js
--- a/app/model/Ort.js Wed Apr 08 10:50:33 2015 +0200
+++ b/app/model/Ort.js Wed Apr 08 10:51:39 2015 +0200
@@ -40,7 +40,21 @@
},
defaultValue: new Date()
}, {
- name: 'treeModified'
+ name: 'treeModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
+ }, {
+ name: 'parentModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
}],
idProperty: 'id',
diff -r f204f30b824a -r af16a257d5f6 app/model/Probe.js
--- a/app/model/Probe.js Wed Apr 08 10:50:33 2015 +0200
+++ b/app/model/Probe.js Wed Apr 08 10:51:39 2015 +0200
@@ -120,7 +120,13 @@
type: 'boolean',
persist: false
}, {
- name: 'treeModified'
+ name: 'treeModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
}],
idProperty: 'id',
diff -r f204f30b824a -r af16a257d5f6 app/model/Status.js
--- a/app/model/Status.js Wed Apr 08 10:50:33 2015 +0200
+++ b/app/model/Status.js Wed Apr 08 10:51:39 2015 +0200
@@ -40,7 +40,21 @@
}, {
name: 'skommentar'
}, {
- name: 'treeModified'
+ name: 'treeModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
+ }, {
+ name: 'parentModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
}],
idProperty: 'id',
diff -r f204f30b824a -r af16a257d5f6 app/model/Zusatzwert.js
--- a/app/model/Zusatzwert.js Wed Apr 08 10:50:33 2015 +0200
+++ b/app/model/Zusatzwert.js Wed Apr 08 10:51:39 2015 +0200
@@ -45,7 +45,21 @@
},
defaultValue: new Date()
}, {
- name: 'treeModified'
+ name: 'treeModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
+ }, {
+ name: 'parentModified',
+ serialize: function(value) {
+ if (value === '') {
+ return null;
+ }
+ return value;
+ }
}],
idProperty: 'id',
More information about the Lada-commits
mailing list