Skip to content
Snippets Groups Projects
Verified Commit ffc93747 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

FIX: Better None handling.

parent 0c6a2f79
Branches
Tags
2 merge requests!160STY: styling,!155Mitigation of server problem with long strings as POV values
...@@ -183,6 +183,11 @@ def _treat_merge_error_of(newrecord, record): ...@@ -183,6 +183,11 @@ def _treat_merge_error_of(newrecord, record):
""" """
for this_p in newrecord.properties: for this_p in newrecord.properties:
that_p = record.get_property(this_p.name) that_p = record.get_property(this_p.name)
if that_p is None:
logger.debug(f"Property {this_p.name} does not exist in the second entity. Note that "
"this should not be the reason for the merge conflict.")
continue
if (isinstance(this_p.value, db.Entity) if (isinstance(this_p.value, db.Entity)
and isinstance(that_p.value, db.Entity)): and isinstance(that_p.value, db.Entity)):
if this_p.value.id is not None and that_p.value.id is not None: if this_p.value.id is not None and that_p.value.id is not None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment