diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-07-26 15:11:44 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-07-26 15:11:44 -0700 |
commit | eeb456c16d016d8523023f787597efae7a6317b9 (patch) | |
tree | 6b79a50b0d4d2c150f3d3a3411ba831fd46358ec /fatcat_scholar/transform.py | |
parent | 51a36f5e6069efedef0fbcd0ba319ced8f28eba4 (diff) | |
download | fatcat-scholar-eeb456c16d016d8523023f787597efae7a6317b9.tar.gz fatcat-scholar-eeb456c16d016d8523023f787597efae7a6317b9.zip |
better parsing of year as integer in refs pipeline
Diffstat (limited to 'fatcat_scholar/transform.py')
-rw-r--r-- | fatcat_scholar/transform.py | 4 |
1 files changed, 2 insertions, 2 deletions
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") |