Skip to content
Snippets Groups Projects

F copy entity

Merged Alexander Schlemmer requested to merge f-copy-entity into dev
1 unresolved thread
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
+ 9
0
@@ -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:
Loading