Improve ModelStorage.copy
* Allow callable in copy default * Support dotted notation in copy default * Use setdefault in copy * Copy default when needed * Do not set default state in copy * Use callable and dotted notation in copy default issue5576 issue7648 review72291002
This commit is contained in:
1 parent
0c590ec211
commit
13539e576b
1 file changed
+1
-1
+1
-1
@@ -37,5 +37,5 @@ class MoveLine(metaclass=PoolMeta):
|
||||
default = {}
|
||||
else:
|
||||
default = default.copy()
|
||||
default.setdefault('dunnings')
|
||||
default.setdefault('dunnings', None)
|
||||
return super(MoveLine, cls).copy(lines, default=default)
|
||||
Reference in new issue
Block a user