Skip to content

Commit

Permalink
Coping with incomplete data
Browse files Browse the repository at this point in the history
  • Loading branch information
mesemus authored Nov 28, 2024
1 parent 377c449 commit 4942532
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oarepo_doi/doi_mapping_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def get_doi(self, record):
object_identifiers = record["metadata"].get("objectIdentifiers", [])
doi = None
for id in object_identifiers:
if id["scheme"] == "DOI":
doi = id["identifier"]
if id.get("scheme") == "DOI":
doi = id.get("identifier")
return doi

def add_doi(self, record, data, doi_value):
Expand Down

0 comments on commit 4942532

Please sign in to comment.