Commit 12853ffe authored by Philipp Arras's avatar Philipp Arras
Browse files

MultiField: Simplify

parent 61b24b7d
Pipeline #111945 passed with stages
in 20 minutes and 56 seconds
......@@ -273,12 +273,7 @@ class MultiField(Operator):
If a field is not present, it is assumed to have an uniform value
of zero.
if self._domain is other._domain:
return self + other
res = self.to_dict()
for key, val in other.items():
res[key] = res[key]+val if key in res else val
return MultiField.from_dict(res)
return self.flexible_addsub(other, False)
def union(fields, domain=None):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment