Skip to content

Commit

Permalink
permissions: fix external DOI versioning generator
Browse files Browse the repository at this point in the history
  • Loading branch information
slint authored and zzacharo committed Jul 25, 2023
1 parent 1e29b99 commit 3d66b29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invenio_rdm_records/services/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class IfExternalDOIRecord(ConditionalGenerator):

def _condition(self, record=None, **kwargs):
"""Check if the record has an external DOI."""
return record["pids"]["doi"]["provider"] == "external"
return record.get("pids", {}).get("doi", {}).get("provider") == "external"


class RecordOwners(Generator):
Expand Down

0 comments on commit 3d66b29

Please sign in to comment.