extend selection of modes for schema instances
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3624 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
9cf4fef900
commit
dcdd97f23d
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ class Instance(BaseInstance):
|
|||
fi = f.getFieldInstance(self)
|
||||
name = f.name
|
||||
value = getattr(self.context, name) or fi.default
|
||||
if mode == 'view':
|
||||
if mode in ('view', 'preview'):
|
||||
value = fi.display(value)
|
||||
else:
|
||||
value = fi.marshall(value)
|
||||
|
|
Loading…
Add table
Reference in a new issue