Skip to content
Snippets Groups Projects
Commit 01714b3a authored by florian's avatar florian
Browse files

FIX: Fix empty_diff for special properties

parent b479d64d
No related branches found
No related tags found
2 merge requests!79Release 0.10.0,!76F fix empty diff
...@@ -353,10 +353,14 @@ def empty_diff(old_entity: Entity, new_entity: Entity, compare_referenced_record ...@@ -353,10 +353,14 @@ def empty_diff(old_entity: Entity, new_entity: Entity, compare_referenced_record
olddiff, newdiff = compare_entities( olddiff, newdiff = compare_entities(
old_entity, new_entity, compare_referenced_records) old_entity, new_entity, compare_referenced_records)
for diff in [olddiff, newdiff]: for diff in [olddiff, newdiff]:
for key in diff: for key in ["parents", "properties"]:
if len(diff[key]) > 0: if len(diff[key]) > 0:
# There is a difference somewhere in the diff # There is a difference somewhere in the diff
return False return False
for key in SPECIAL_ATTRIBUTES:
if key in diff and diff[key]:
# There is a difference in at least one special attribute
return False
# all elements of the two diffs were empty # all elements of the two diffs were empty
return True return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment