allow for protect a field from overwriting (e.g. on import) by using 'magic' value __no_change__
This commit is contained in:
parent
ed0148b213
commit
c65ab2ce77
1 changed files with 2 additions and 0 deletions
|
@ -104,6 +104,8 @@ class Editor(BaseInstance):
|
|||
fi = formState.fieldInstances[name]
|
||||
#rawValue = data.get(name, u'')
|
||||
rawValue = fi.getRawValue(data, name, u'')
|
||||
if rawValue == '__no_change__':
|
||||
continue
|
||||
value = fi.unmarshall(rawValue)
|
||||
if ftype in fieldHandlers: # caller wants special treatment of field
|
||||
fieldHandlers[ftype](context, value, fi, formState)
|
||||
|
|
Loading…
Add table
Reference in a new issue