Skip to content

Commit

Permalink
Merge pull request #8 from oarepo/miroslavsimek/be-543-oarepo-doi
Browse files Browse the repository at this point in the history
Handling incomplete records - preventing exceptions
  • Loading branch information
Alzpeta authored Nov 28, 2024
2 parents 377c449 + 3195282 commit adc86d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = oarepo-doi
version = 1.0.15
version = 1.0.16
description =
authors = Alzbeta Pokorna <[email protected]>
readme = README.md
Expand Down

0 comments on commit adc86d7

Please sign in to comment.