Skip to content
Snippets Groups Projects
Commit f66eba25 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

STY: style fixes for this branch

parent 27c515a4
No related branches found
No related tags found
3 merge requests!57RELEASE 0.7.3,!50F merge entities,!45F copy entity
Pipeline #20485 canceled
......@@ -727,14 +727,14 @@ def merge_entities(entity_a: Entity, entity_b: Entity):
for key in diff_r2["properties"]:
if key in diff_r1["properties"]:
if ("importance" in diff_r1["properties"][key] and
"importance" in diff_r2["properties"][key]):
"importance" in diff_r2["properties"][key]):
if (diff_r1["properties"][key]["importance"] !=
diff_r2["properties"][key]["importance"]):
diff_r2["properties"][key]["importance"]):
raise NotImplementedError()
elif ("importance" in diff_r1["properties"][key] or
"importance" in diff_r2["properties"][key]):
raise NotImplementedError()
for attribute in ("datatype", "unit", "value"):
if diff_r1["properties"][key][attribute] is None:
setattr(entity_a.get_property(key), attribute,
......
......@@ -231,6 +231,7 @@ def test_compare_special_properties():
assert len(diff_r1["properties"]) == 0
assert len(diff_r2["properties"]) == 0
def test_copy_entities():
r = db.Record(name="A")
r.add_parent(name="B")
......
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