*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit b5120d88 authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Adjust to metadata model changes in January release

* creators now have the "name" nested inside a property called
  "person_or_org"
parent 39cfda58
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,9 @@ def tuw_cite_as(record_metadata):
"""Create an APA citation text like Zenodo."""
# fetch the raw values from the record (with fallback values)
creators = record_metadata.get("creators")
creator_names = [creator.get("name") for creator in creators]
creator_names = [
creator.get("person_or_org", {}).get("name") for creator in creators
]
num_creators = len(creator_names)
publication_date = record_metadata.get("publication_date", arrow.utcnow().year)
title = record_metadata.get("title")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment