fix: avoid error when form value cannot be obtained
This commit is contained in:
parent
71d63f6b93
commit
bc399182ba
|
@ -1380,7 +1380,11 @@ class Form(object):
|
|||
return getattr(record, field_name)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
return record[field_name]
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
# TODO: is this always safe to do?
|
||||
elif self.defaults and field_name in self.defaults:
|
||||
|
|
Loading…
Reference in a new issue