From 5376694afad6c198ccb55de5381663420a7cb780 Mon Sep 17 00:00:00 2001 From: Alexander Schlemmer <alexander@mail-schlemmer.de> Date: Mon, 24 Oct 2022 10:13:51 +0200 Subject: [PATCH] FIX: added check for None values in identified cache --- src/caoscrawler/identified_cache.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/caoscrawler/identified_cache.py b/src/caoscrawler/identified_cache.py index 7b680b5a..b5ee1baa 100644 --- a/src/caoscrawler/identified_cache.py +++ b/src/caoscrawler/identified_cache.py @@ -53,7 +53,9 @@ def _value_representation(value): # 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 # 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) elif isinstance(value, db.Entity): if value.id is not None: @@ -66,6 +68,7 @@ def _value_representation(value): or isinstance(value, datetime)): return str(value) else: + breakpoint() raise ValueError(f"Unknown datatype of the value: {value}") -- GitLab