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

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

WIP: Fixes

parent 087edcf0
No related branches found
No related tags found
1 merge request!8Refactoring/Modernization
......@@ -63,7 +63,6 @@ def create_blueprint(app):
else "{}, {}".format(creator.get("family_name"), creator.get("given_name"))
for creator in creator_entries
]
num_creators = len(creator_names)
publication_date = record_metadata.get("publication_date", arrow.utcnow().year)
title = record_metadata.get("title")
publisher = record_metadata.get("publisher", app.config.get("THEME_SITENAME"))
......@@ -72,8 +71,6 @@ def create_blueprint(app):
doi = tuw_doi_identifier(record_metadata.get("identifiers"))
# format the values
vocabulary = Vocabularies.get_vocabulary("resource_type")
fmt_creators = ", ".join(creator_names)
pub_date = parse_edtf(publication_date)
pub_year_start = pub_date.lower_strict().tm_year
pub_year_end = pub_date.upper_strict().tm_year
......@@ -90,7 +87,7 @@ def create_blueprint(app):
titles = dict(resource_type).get("title")
if "en" in titles:
fmt_resource_type = titles["en"]
if "de" in titles:
elif "de" in titles:
fmt_resource_type = titles["de"]
elif titles:
first_language = list(titles)[0]
......@@ -108,6 +105,7 @@ def create_blueprint(app):
# format the author names roughly according to the APA logic:
# https://research.moreheadstate.edu/c.php?g=107001&p=695202
num_creators = len(creator_names)
if num_creators <= 2:
fmt_creators = " and ".join(creator_names)
elif num_creators <= 5:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment