Skip to content

Commit

Permalink
fix the check for the #doi semantic
Browse files Browse the repository at this point in the history
  • Loading branch information
kimakan committed Dec 27, 2023
1 parent d260816 commit 60b26f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daiquiri/oai/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ def get_datalink(self, pk):
'related_identifiers': []
}
for _, access_url, _, _, description, semantics, content_type, content_length in rows:
if semantics == '#doi':
# doi is a custom datalink semantic which means that it will containt the full URL to the description
# hence, only the end of the semantics string should be checked for #doi
if semantics.endswith('#doi'):
datalink['doi'] = get_doi(access_url)
datalink['title'] = description

Expand Down

0 comments on commit 60b26f1

Please sign in to comment.