Skip to content

Commit

Permalink
Workaround an issue with the schedule editor by ensuring no sessions …
Browse files Browse the repository at this point in the history
…remain scheduled in a room whose purpose has changed to something other than holding sessions (such as becoming unavailable). Commit ready for merge.

 - Legacy-Id: 13586
  • Loading branch information
rjsparks committed Jun 12, 2017
1 parent 356fa71 commit d4acb1c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ietf/meeting/ajax.py
Expand Up @@ -205,6 +205,19 @@ def timeslot_updslot(request, meeting, slotid):

slot.save()

# WORKAROUND: Right now, if there are sessions scheduled in this timeslot
# when it is marked unavailable (or any other value besides "session") they
# become unreachable from the editing screen. The session is listed in the
# "unscheduled" block incorrectly, and drag-dropping it onto the a new
# timeslot produces erroneous results. To avoid this, we will silently
# unschedule any sessions in the timeslot that has just been made
# unavailable.

if slot.type_id != 'session':
slot.sessionassignments.all().delete()

# ENDWORKAROUND

# need to return the new object.
dict1 = slot.json_dict(request.build_absolute_uri('/'))
dict1['message'] = 'valid'
Expand Down

0 comments on commit d4acb1c

Please sign in to comment.