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:
Cédric Krier committed 2018-09-01 01:02:03 +02:00
1 parent 0c590ec211
commit 13539e576b
1 file changed
+1 -1
+1 -1
View File
@@ -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)