From eeb456c16d016d8523023f787597efae7a6317b9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 26 Jul 2021 15:11:44 -0700 Subject: better parsing of year as integer in refs pipeline --- fatcat_scholar/transform.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fatcat_scholar/transform.py') diff --git a/fatcat_scholar/transform.py b/fatcat_scholar/transform.py index 13bedb9..3a7102a 100644 --- a/fatcat_scholar/transform.py +++ b/fatcat_scholar/transform.py @@ -798,8 +798,8 @@ def refs_from_crossref( ref_container_name = series_title year = ref.get("year") - if year and year.isdigit(): - year = int(year) + if year: + year = clean_small_int(year) else: year = None date = ref.get("date") -- cgit v1.2.3