diff --git a/src/caosdb/apiutils.py b/src/caosdb/apiutils.py index a5f10c6ee4be3cd52f250935a28d998242deca34..b1721e255a5369efc228769c6b6481d9fc1c8ff6 100644 --- a/src/caosdb/apiutils.py +++ b/src/caosdb/apiutils.py @@ -680,6 +680,15 @@ def compare_entities(old_entity: Entity, new_entity: Entity): def merge_entities(entity_a: Entity, entity_b: Entity): """ Merge entity_b into entity_a such that they have the same parents and properties. + + datatype, unit, value, name and description will only be changed in entity_a if they + are None for entity_a and set for entity_b. If there is a corresponding value + for entity_a different from None a RuntimeError will be raised informing of an + unresolvable merge conflict. + + The merge operation is done in place. + + Returns entity_a. """ # Compare both entities: