From b70d0f98bce6f7accfaffb9a2f159605d5d710df Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Mon, 9 Dec 2024 17:04:46 +0100 Subject: [PATCH] WIP: Better diff in case of different types. --- src/linkahead/apiutils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/linkahead/apiutils.py b/src/linkahead/apiutils.py index b0b65d8d..53336a4a 100644 --- a/src/linkahead/apiutils.py +++ b/src/linkahead/apiutils.py @@ -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: -- GitLab