prevent mess when copying BaseObject instances
Note: to understand this fix, see AbstractElement.__init__ -- it calls deepcopy on parent.env, it caused copying of objects we do not want to copy such as thread locks.
This commit is contained in:
parent
a5260326d3
commit
bb4e91aa2e
1 changed files with 3 additions and 0 deletions
|
|
@ -338,6 +338,9 @@ class BaseObject(object):
|
|||
obj._fields = copy(self._fields)
|
||||
return obj
|
||||
|
||||
def __deepcopy__(self, memo):
|
||||
return self.copy()
|
||||
|
||||
def set_empty_fields(self, value, excepts=()):
|
||||
"""
|
||||
Set the same value on all empty fields.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue