Skip to content

Commit

Permalink
fix access url for the related doi and minor typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kimakan committed Dec 20, 2023
1 parent 520a5d2 commit be2b10e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions daiquiri/datalink/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ def get_schema_links(self, schema):
description = DATALINK_RELATION_TYPES.get(related_identifier.get('relation_type'), '') \
.format('the {} schema'.format(schema)) \
.capitalize()
if related_identifier.get('related_identifier_type') == "DOI":
access_url = get_doi_url(access_url)

schema_links.append({
'ID': identifier,
'access_url': access_url,
Expand Down Expand Up @@ -262,6 +265,9 @@ def get_table_links(self, table):
.format('the {} table'.format(table)) \
.capitalize()

if related_identifier.get('related_identifier_type') == "DOI":
access_url = get_doi_url(access_url)

table_links.append({
'ID': identifier,
'access_url': access_url,
Expand Down
2 changes: 1 addition & 1 deletion daiquiri/datalink/templates/datalink/datalink.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h2>Data Links</h2>
</td>
<td>{{ datalink.content_type }}</td>
<td>
{% if datalink_content_length > 0 %}
{% if datalink.content_length > 0 %}
{{ datalink.content_length | filesizeformat }}
{% else %}
{{ datalink.content_length }}
Expand Down

0 comments on commit be2b10e

Please sign in to comment.