diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-06-17 16:26:50 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-06-23 17:51:15 -0700 |
commit | fa11747574f086e99459914f93d24bad7a8eacce (patch) | |
tree | 9e05825c26de60042142dd846cee31d85661a6b4 /python/fatcat_tools/transforms | |
parent | cf2c3432d3c28d2ba0a92c62fabda4ca434afe46 (diff) | |
download | fatcat-fa11747574f086e99459914f93d24bad7a8eacce.tar.gz fatcat-fa11747574f086e99459914f93d24bad7a8eacce.zip |
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.
Diffstat (limited to 'python/fatcat_tools/transforms')
-rw-r--r-- | python/fatcat_tools/transforms/ingest.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |