Skip to content

Commit

Permalink
fix: version doi indentifier bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sagargg committed Jul 26, 2024
1 parent 62ac3ae commit 00a43a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ckanext/doi/model/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This file is part of ckanext-doi
# Created by the Natural History Museum in London, UK

import re
from ckan.model import Session

from ckanext.doi.model.doi import DOI, doi_table
Expand Down Expand Up @@ -64,7 +64,8 @@ def read_package(
)

if version_doi:
suffix = f'{version_doi.identifier}.v{version}'
identifier = re.sub(r'\.v\d+$', '', version_doi.identifier)
suffix = f"{identifier}.v{version}"

if doi_exist is None and create_if_none:
client = DataciteClient()
Expand Down

0 comments on commit 00a43a9

Please sign in to comment.