Skip to content

Commit

Permalink
Merge pull request #29 from scaarup/26-kalender-virker-kun-for-en-enk…
Browse files Browse the repository at this point in the history
…elt-elev

More error handling
  • Loading branch information
scaarup authored Nov 15, 2022
2 parents 3e57ea1 + 6e4930a commit 0c08db4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions custom_components/aula/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ def parseCalendarData(self,i=None):
try:
teacher = c['lesson']['participants'][0]['teacherInitials']
except:
_LOGGER.debug("Lesson json dump"+str(c['lesson']))
teacher = c['lesson']['participants'][0]['teacherName']
try:
_LOGGER.debug("Lesson json dump"+str(c['lesson']))
teacher = c['lesson']['participants'][0]['teacherName']
except:
continue
event = CalendarEvent(
summary=summary+", "+teacher,
start = start,
Expand Down

0 comments on commit 0c08db4

Please sign in to comment.