Skip to content
Snippets Groups Projects
Verified Commit b70d0f98 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

WIP: Better diff in case of different types.

parent b1a00123
No related branches found
No related tags found
1 merge request!185High level API serialization
Pipeline #58808 passed
......@@ -291,10 +291,10 @@ def compare_entities(entity0: Optional[Entity] = None,
if entity0 is entity1:
return diff
# FIXME Why not simply return a diff which says that the types are different?g
# FIXME Why not simply return a diff which says that the types are different?
if type(entity0) is not type(entity1):
raise ValueError(
"Comparison of different Entity types is not supported.")
diff[0]["type"] = type(entity0)
diff[1]["type"] = type(entity1)
# compare special attributes
for attr in SPECIAL_ATTRIBUTES:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment