From fa11747574f086e99459914f93d24bad7a8eacce Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 17 Jun 2021 16:26:50 -0700 Subject: more consistent and defensive lower-casing of DOIs After noticing more upper/lower ambiguity in production. In particular, we have some old ingest requests in sandcrawler DB, which get re-submitted/re-tried, which have capitalized DOIs in the link source id field. --- python/fatcat_tools/transforms/ingest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/fatcat_tools/transforms') diff --git a/python/fatcat_tools/transforms/ingest.py b/python/fatcat_tools/transforms/ingest.py index 9aaeaa84..42927b2a 100644 --- a/python/fatcat_tools/transforms/ingest.py +++ b/python/fatcat_tools/transforms/ingest.py @@ -50,9 +50,9 @@ def release_ingest_request(release, ingest_request_source='fatcat', ingest_type= link_source = "pmc" link_source_id = release.ext_ids.pmcid elif release.ext_ids.doi: - url = "https://doi.org/{}".format(release.ext_ids.doi) + url = "https://doi.org/{}".format(release.ext_ids.doi.lower()) link_source = "doi" - link_source_id = release.ext_ids.doi + link_source_id = release.ext_ids.doi.lower() if not url: return None -- cgit v1.2.3