Skip to content

Commit

Permalink
legacy: fix grants serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Oct 23, 2023
1 parent 05f0df2 commit ac7542b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions site/zenodo_rdm/legacy/serializers/schemas/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ def dump_access_right(self, obj):

def _grant(self, award, funder):
"""Serialize an RDM award and funder into a legacy Zenodo grant."""
# RDM allows specifying only funder
if not award:
return
funder_id = funder.get("id")
funder_id = FUNDER_ROR_TO_DOI.get(funder_id, funder_id)
award_number = award.get("number")
Expand Down

0 comments on commit ac7542b

Please sign in to comment.