Mercurial > lada > lada-client
comparison app/model/Probe.js @ 677:394c12b7bb21
Updated probe model to serialize empty strings to a null-value.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 24 Mar 2015 10:40:01 +0100 |
parents | d47ee7439f44 |
children | c07419f07a0c c5b8896768a2 |
comparison
equal
deleted
inserted
replaced
676:0d5fb0f585f1 | 677:394c12b7bb21 |
---|---|
20 }, { | 20 }, { |
21 name: 'hauptprobenNr' | 21 name: 'hauptprobenNr' |
22 }, { | 22 }, { |
23 name: 'test' | 23 name: 'test' |
24 }, { | 24 }, { |
25 name: 'netzbetreiberId' | 25 name: 'netzbetreiberId', |
26 serialize: function(value) { | |
27 if (value === '') { | |
28 return null; | |
29 } | |
30 return value; | |
31 } | |
26 }, { | 32 }, { |
27 name: 'mstId' | 33 name: 'mstId' |
28 }, { | 34 }, { |
29 name: 'datenbasisId' | 35 name: 'datenbasisId' |
30 }, { | 36 }, { |
34 }, { | 40 }, { |
35 name: 'mediaDesk' | 41 name: 'mediaDesk' |
36 }, { | 42 }, { |
37 name: 'media' | 43 name: 'media' |
38 }, { | 44 }, { |
39 name: 'umwId' | 45 name: 'umwId', |
46 serialize: function(value) { | |
47 if (value === '') { | |
48 return null; | |
49 } | |
50 return value; | |
51 } | |
40 }, { | 52 }, { |
41 name: 'probeentnahmeBeginn', | 53 name: 'probeentnahmeBeginn', |
42 type: 'date', | 54 type: 'date', |
43 convert: function(v) { | 55 convert: function(v) { |
44 if (!v) { | 56 if (!v) { |