FIX: use "Amtlicher Vorname" if given
This commit is contained in:
parent
0eace931c2
commit
409142add8
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ def read_csv(csv_path):
|
||||||
else:
|
else:
|
||||||
with csvfile:
|
with csvfile:
|
||||||
reader = csv.DictReader(csvfile, delimiter=",")
|
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"]
|
t['Status'] == "Student"]
|
||||||
persons.sort(key=itemgetter("Hochschule", "Name"))
|
persons.sort(key=itemgetter("Hochschule", "Name"))
|
||||||
for idx, p in enumerate(persons):
|
for idx, p in enumerate(persons):
|
||||||
|
|
Loading…
Reference in a new issue