fix instance default value getter
This commit is contained in:
parent
ab72a31bf0
commit
46582b51fe
1 changed files with 3 additions and 1 deletions
|
@ -53,7 +53,9 @@ class Instance(BaseInstance):
|
|||
fi = f.getFieldInstance(self, context=kw.get('context'),
|
||||
request=kw.get('request'))
|
||||
name = f.name
|
||||
value = getattr(self.context, name) or fi.default
|
||||
value = getattr(self.context, name, None)
|
||||
if value is None:
|
||||
value = fi.default
|
||||
if mode in ('view', 'preview'):
|
||||
value = fi.display(value)
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue