From ebee2dec965fcdf35bfa68b7dc1d800ee235f05d Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 11 Feb 2021 14:00:28 +0100 Subject: workaround for dates --- fuzzycat/refs.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fuzzycat') 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 -- cgit v1.2.3