Skip to content

Commit 40181b8

Browse files
committed
Merged in [13586] from rjsparks@nostrum.com:
Workaround an issue with the schedule editor by ensuring no sessions remain scheduled in a room whose purpose has changed to something other than holding sessions (such as becoming unavailable). - Legacy-Id: 13589 Note: SVN reference [13586] has been migrated to Git commit d4acb1c
2 parents f75ec36 + d4acb1c commit 40181b8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

ietf/meeting/ajax.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,19 @@ def timeslot_updslot(request, meeting, slotid):
205205

206206
slot.save()
207207

208+
# WORKAROUND: Right now, if there are sessions scheduled in this timeslot
209+
# when it is marked unavailable (or any other value besides "session") they
210+
# become unreachable from the editing screen. The session is listed in the
211+
# "unscheduled" block incorrectly, and drag-dropping it onto the a new
212+
# timeslot produces erroneous results. To avoid this, we will silently
213+
# unschedule any sessions in the timeslot that has just been made
214+
# unavailable.
215+
216+
if slot.type_id != 'session':
217+
slot.sessionassignments.all().delete()
218+
219+
# ENDWORKAROUND
220+
208221
# need to return the new object.
209222
dict1 = slot.json_dict(request.build_absolute_uri('/'))
210223
dict1['message'] = 'valid'

0 commit comments

Comments
 (0)