[FIX] fields: related fields should not be copied by default
This commit is contained in:
parent
c49d20c61a
commit
f650522bbf
|
@ -317,8 +317,9 @@ class Field(object):
|
||||||
attrs['copy'] = attrs.get('copy', False)
|
attrs['copy'] = attrs.get('copy', False)
|
||||||
attrs['readonly'] = attrs.get('readonly', not attrs.get('inverse'))
|
attrs['readonly'] = attrs.get('readonly', not attrs.get('inverse'))
|
||||||
if attrs.get('related'):
|
if attrs.get('related'):
|
||||||
# by default, related fields are not stored
|
# by default, related fields are not stored and not copied
|
||||||
attrs['store'] = attrs.get('store', False)
|
attrs['store'] = attrs.get('store', False)
|
||||||
|
attrs['copy'] = attrs.get('copy', False)
|
||||||
|
|
||||||
# fix for function fields overridden by regular columns
|
# fix for function fields overridden by regular columns
|
||||||
if not isinstance(attrs.get('column'), (NoneType, fields.function)):
|
if not isinstance(attrs.get('column'), (NoneType, fields.function)):
|
||||||
|
|
Loading…
Reference in New Issue