Tweak "coalesce" logic for merging field data
This commit is contained in:
parent
4c3112b85b
commit
0798102ba5
|
@ -2128,7 +2128,9 @@ class MasterView(View):
|
||||||
def get_merge_resulting_data(self, remove, keep):
|
def get_merge_resulting_data(self, remove, keep):
|
||||||
result = dict(keep)
|
result = dict(keep)
|
||||||
for field in self.get_merge_coalesce_fields():
|
for field in self.get_merge_coalesce_fields():
|
||||||
if remove[field] and not keep[field]:
|
if remove[field] is not None and keep[field] is None:
|
||||||
|
result[field] = remove[field]
|
||||||
|
elif remove[field] and not keep[field]:
|
||||||
result[field] = remove[field]
|
result[field] = remove[field]
|
||||||
for field in self.get_merge_additive_fields():
|
for field in self.get_merge_additive_fields():
|
||||||
if isinstance(keep[field], (list, tuple)):
|
if isinstance(keep[field], (list, tuple)):
|
||||||
|
|
Loading…
Reference in a new issue