aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzycat
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-02-11 14:00:28 +0100
committerMartin Czygan <martin.czygan@gmail.com>2021-02-11 14:00:28 +0100
commitebee2dec965fcdf35bfa68b7dc1d800ee235f05d (patch)
treefa17a84fed1a590ab02dbe475e144d71d7370455 /fuzzycat
parent7c2b7f5586797363a03e991149ae444845b28185 (diff)
downloadfuzzycat-ebee2dec965fcdf35bfa68b7dc1d800ee235f05d.tar.gz
fuzzycat-ebee2dec965fcdf35bfa68b7dc1d800ee235f05d.zip
workaround for dates
Diffstat (limited to 'fuzzycat')
-rw-r--r--fuzzycat/refs.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/fuzzycat/refs.py b/fuzzycat/refs.py
index 3f6b2ed..e2c3043 100644
--- a/fuzzycat/refs.py
+++ b/fuzzycat/refs.py
@@ -32,6 +32,10 @@ def ref_entities(docs):
for doc in docs:
try:
if glom(doc, "extra.skate.status") == "ref":
+ # XXX: on the fly fix for int/str years
+ release_year = doc.get("release_year")
+ if release_year is not None and isinstance(release_year, str):
+ doc["release_year"] = int(release_year)
yield doc
except PathAccessError:
continue