Skip to content
Snippets Groups Projects
Commit 8292ca52 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: add more verbose error message

parent c4c04cdb
No related branches found
No related tags found
1 merge request!71Release 0.9
Pipeline #29594 passed
......@@ -344,7 +344,13 @@ def merge_entities(entity_a: Entity, entity_b: Entity):
setattr(entity_a.get_property(key), attribute,
diff_r2["properties"][key][attribute])
else:
raise RuntimeError("Merge conflict.")
raise RuntimeError(
f"Merge conflict:\nEntity a ({entity_a.id}, {entity_a.name}) "
f"has a Property '{key}' with {attribute}="
f"{diff_r2['properties'][key][attribute]}\n"
f"Entity b ({entity_b.id}, {entity_b.name}) "
f"has a Property '{key}' with {attribute}="
f"{diff_r1['properties'][key][attribute]}")
else:
# TODO: This is a temporary FIX for
# https://gitlab.indiscale.com/caosdb/src/caosdb-pylib/-/issues/105
......
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