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

FIX: added check for None values in identified cache

parent 4e9d33d1
No related branches found
No related tags found
2 merge requests!71REL: RElease v0.2.0,!59Fix hash function
Checking pipeline status
...@@ -53,7 +53,9 @@ def _value_representation(value): ...@@ -53,7 +53,9 @@ def _value_representation(value):
# to allow the special case of Files as values of properties. # to allow the special case of Files as values of properties.
# We need to review the completeness of all the cases here, as the cache # We need to review the completeness of all the cases here, as the cache
# is crucial for correct identification of insertion and updates. # is crucial for correct identification of insertion and updates.
if isinstance(value, db.File): if value is None:
return "None"
elif isinstance(value, db.File):
return str(value.path) return str(value.path)
elif isinstance(value, db.Entity): elif isinstance(value, db.Entity):
if value.id is not None: if value.id is not None:
...@@ -66,6 +68,7 @@ def _value_representation(value): ...@@ -66,6 +68,7 @@ def _value_representation(value):
or isinstance(value, datetime)): or isinstance(value, datetime)):
return str(value) return str(value)
else: else:
breakpoint()
raise ValueError(f"Unknown datatype of the value: {value}") raise ValueError(f"Unknown datatype of the value: {value}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment