Skip to content

Commit

Permalink
Bug Fix in Publication Handler
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoReidelbach committed Sep 16, 2024
1 parent dd57708 commit 0d595a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MaRDMO/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def PublicationCitationRetriever(sender, **kwargs):
valueEditor(instance,f"{BASE_URI}domain/PublicationInformation",0)

elif re.match(r'doi:10.\d{4,9}/[-._;()/:a-z0-9A-Z]+', instance.text):

path = os.path.join(os.path.dirname(__file__), 'data', 'options.json')
with open(path, "r") as json_file:
option = json.load(json_file)

# Extract DOI and Initialize different dictionaries
doi = instance.text.split(':')[1]
Expand Down Expand Up @@ -113,10 +117,6 @@ def PublicationCitationRetriever(sender, **kwargs):
dict_merged['mardi_publicationDescription1'] = mardi_dict[0].get('publicationDescription1', []).get('value')
else:

path = os.path.join(os.path.dirname(__file__), 'data', 'options.json')
with open(path, "r") as json_file:
option = json.load(json_file)

# If no results found in MaRDI KG or Wikidata use DOI to get complete citation
orcid_authors, zbmath_authors, other_authors, citation_dictionary = GetCitation(doi)

Expand Down

0 comments on commit 0d595a0

Please sign in to comment.