From f3622f43710749a6b84f07bebb2d20b9731c1d84 Mon Sep 17 00:00:00 2001 From: Alexander Schlemmer <alexander@mail-schlemmer.de> Date: Tue, 12 Apr 2022 15:17:34 +0200 Subject: [PATCH] DOC: updated docstring of merge_entities --- src/caosdb/apiutils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/caosdb/apiutils.py b/src/caosdb/apiutils.py index a5f10c6e..b1721e25 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: -- GitLab