diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-02-11 14:00:28 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-02-11 14:00:28 +0100 |
commit | ebee2dec965fcdf35bfa68b7dc1d800ee235f05d (patch) | |
tree | fa17a84fed1a590ab02dbe475e144d71d7370455 | |
parent | 7c2b7f5586797363a03e991149ae444845b28185 (diff) | |
download | fuzzycat-ebee2dec965fcdf35bfa68b7dc1d800ee235f05d.tar.gz fuzzycat-ebee2dec965fcdf35bfa68b7dc1d800ee235f05d.zip |
workaround for dates
-rw-r--r-- | fuzzycat/refs.py | 4 |
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 |