FIX: use "Amtlicher Vorname" if given

This commit is contained in:
Dominik Rimpf 2022-10-29 18:47:05 +02:00
parent 0eace931c2
commit 409142add8
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ def read_csv(csv_path):
else:
with csvfile:
reader = csv.DictReader(csvfile, delimiter=",")
persons = [{"Name": f"{t['Vorname']} {t['Nachname']}", "Hochschule": f"{t['Standort']}"} for t in reader if
persons = [{"Name": f"{t['Amtlicher Vorname'] if t['Amtlicher Vorname'] else t['Vorname']} {t['Nachname']}", "Hochschule": f"{t['Standort']}"} for t in reader if
t['Status'] == "Student"]
persons.sort(key=itemgetter("Hochschule", "Name"))
for idx, p in enumerate(persons):