Skip to content

Commit

Permalink
Merge pull request #64 from sul-dlss-labs/key-error
Browse files Browse the repository at this point in the history
Check that identifier structure is ok
  • Loading branch information
edsu authored Jun 28, 2024
2 parents a66ad03 + f841bd7 commit e58f525
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rialto_airflow/harvest/sul_pub.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def harvest(host, key, since, limit):

def extract_doi(record):
for id in record.get("identifier"):
if id["type"] == "doi":
doi_id = id["id"].replace("https://doi.org/", "")
return doi_id
if id.get("type") == "doi" and "id" in id:
return id["id"].replace("https://doi.org/", "")
return None

0 comments on commit e58f525

Please sign in to comment.