Added a guard against trying to serialize session UTC start time for a meeting with unknown timezone.

- Legacy-Id: 18112
This commit is contained in:
Henrik Levkowetz 2020-07-01 11:34:39 +00:00
parent 1743f0e591
commit 7b568df3ed

View file

@ -1416,7 +1416,9 @@ def agenda_json(request, num=None ):
sessdict['agenda_note'] = asgn.session.agenda_note sessdict['agenda_note'] = asgn.session.agenda_note
if asgn.session.remote_instructions: if asgn.session.remote_instructions:
sessdict['remote_instructions'] = asgn.session.remote_instructions sessdict['remote_instructions'] = asgn.session.remote_instructions
sessdict['start'] = asgn.timeslot.utc_start_time().strftime("%Y-%m-%dT%H:%M:%SZ") utc_start = asgn.timeslot.utc_start_time()
if utc_start:
sessdict['start'] = utc_start.strftime("%Y-%m-%dT%H:%M:%SZ")
sessdict['duration'] = str(asgn.timeslot.duration) sessdict['duration'] = str(asgn.timeslot.duration)
sessdict['location'] = asgn.room_name sessdict['location'] = asgn.room_name
if asgn.timeslot.location: # Some socials have an assignment but no location if asgn.timeslot.location: # Some socials have an assignment but no location