diff --git a/calendar_generation.py b/calendar_generation.py index c2efdf2..c52da9d 100644 --- a/calendar_generation.py +++ b/calendar_generation.py @@ -63,7 +63,10 @@ async def getWeek(weekstart: datetime, file: str, showsat: bool): formstart = forml[0] formend = forml[1] try: - teacher = event["ATTENDEE"].params["CN"] + if type(event["ATTENDEE"]) is not list: + teacher = [event["ATTENDEE"].params["CN"]] + else: + teacher = [i.params["CN"] for i in event["ATTENDEE"]] except KeyError: teacher = "" eventdict = { diff --git a/templates/plan-general.html b/templates/plan-general.html index ecf996c..96be0ce 100644 --- a/templates/plan-general.html +++ b/templates/plan-general.html @@ -66,7 +66,9 @@ {% block event %} {% endblock %}
{{ i["name"] }}
{{ i["room"] }}
-{{ i["teacher"] }}
+ {% for teacher in i["teacher"] %} +{{ teacher }}
+ {% endfor %}{{ i["start"] }} - {{ i["end"] }} ({{ i["dur"] }}h)
{% endif %}