Skip to content
Snippets Groups Projects

FIX: compare_entities was not written for properties. raise error

Merged Henrik tom Wörden requested to merge f-fix-62 into dev
2 files
+ 43
4
Compare changes
  • Side-by-side
  • Inline

Files

+ 4
2
@@ -215,8 +215,9 @@ def compare_entities(old_entity: Entity, new_entity: Entity, compare_referenced_
if old_entity is new_entity:
return (olddiff, newdiff)
if (isinstance(old_entity, Property) or isinstance(old_entity, Property)):
raise NotImplementedError("Comparing Properties is currently not supported.")
if type(old_entity) is not type(new_entity):
raise ValueError(
"Comparison of different Entity types is not supported.")
for attr in SPECIAL_ATTRIBUTES:
try:
@@ -249,6 +250,7 @@ def compare_entities(old_entity: Entity, new_entity: Entity, compare_referenced_
newdiff[attr] = newattr
# properties
for prop in old_entity.properties:
matching = [p for p in new_entity.properties if p.name == prop.name]
Loading