Skip to content

Commit 0d5a940

Browse files
committed
Create no ScheduledSessions with session=None
- Legacy-Id: 7510
1 parent ad54cfe commit 0d5a940

2 files changed

Lines changed: 18 additions & 16 deletions

File tree

ietf/meeting/models.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,16 @@ def build_timeslices(self):
179179

180180
# this functions makes a list of timeslices and rooms, and
181181
# makes sure that all schedules have all of them.
182-
def create_all_timeslots(self):
183-
alltimeslots = self.timeslot_set.all()
184-
for sched in self.schedule_set.all():
185-
ts_hash = {}
186-
for ss in sched.scheduledsession_set.all():
187-
ts_hash[ss.timeslot] = ss
188-
for ts in alltimeslots:
189-
if not (ts in ts_hash):
190-
ScheduledSession.objects.create(schedule = sched,
191-
timeslot = ts)
182+
# def create_all_timeslots(self):
183+
# alltimeslots = self.timeslot_set.all()
184+
# for sched in self.schedule_set.all():
185+
# ts_hash = {}
186+
# for ss in sched.scheduledsession_set.all():
187+
# ts_hash[ss.timeslot] = ss
188+
# for ts in alltimeslots:
189+
# if not (ts in ts_hash):
190+
# ScheduledSession.objects.create(schedule = sched,
191+
# timeslot = ts)
192192

193193
def vtimezone(self):
194194
if self.time_zone:
@@ -265,7 +265,7 @@ def create_timeslots(self):
265265
time=ts.time,
266266
location=self,
267267
duration=ts.duration)
268-
self.meeting.create_all_timeslots()
268+
#self.meeting.create_all_timeslots()
269269

270270
def domid(self):
271271
return "room%u" % (self.pk)
@@ -411,7 +411,7 @@ def create_concurrent_timeslots(self):
411411
ts.location = room
412412
ts.save()
413413

414-
self.meeting.create_all_timeslots()
414+
#self.meeting.create_all_timeslots()
415415

416416
"""
417417
This routine deletes all timeslots which are in the same time as this slot.

ietf/secr/meetings/views.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ def build_timeslots(meeting,room=None):
9595
time=new_time,
9696
location=room,
9797
duration=t.duration)
98-
ScheduledSession.objects.create(schedule=schedule,timeslot=t)
99-
meeting.create_all_timeslots();
98+
# Is this still right? I thought we had already moved away from dangling ScheduledSessions.
99+
# ScheduledSession.objects.create(schedule=schedule,timeslot=t)
100+
#meeting.create_all_timeslots();
100101

101102
def build_nonsession(meeting):
102103
'''
@@ -127,7 +128,8 @@ def build_nonsession(meeting):
127128
time=new_time,
128129
duration=slot.duration,
129130
show_location=slot.show_location)
130-
ScheduledSession.objects.create(schedule=schedule,session=session,timeslot=ts)
131+
if session:
132+
ScheduledSession.objects.create(schedule=schedule,session=session,timeslot=ts)
131133

132134
def get_last_meeting(meeting):
133135
last_number = int(meeting.number) - 1
@@ -815,7 +817,7 @@ def times(request, meeting_id):
815817
time=new_time,
816818
location=room,
817819
duration=duration)
818-
ScheduledSession.objects.create(schedule=meeting.agenda,timeslot=ts)
820+
#ScheduledSession.objects.create(schedule=meeting.agenda,timeslot=ts)
819821

820822
messages.success(request, 'Timeslots created')
821823
return redirect('meetings_times', meeting_id=meeting_id)

0 commit comments

Comments
 (0)