Skip to content

Commit 038e906

Browse files
committed
From rcross@amsl.com: Don't copy breaks etc, when creating new Empty Schedule for meetings. Fixes issue ietf-tools#2713.
- Legacy-Id: 16805
1 parent 92a8411 commit 038e906

1 file changed

Lines changed: 3 additions & 37 deletions

File tree

ietf/secr/meetings/views.py

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright The IETF Trust 2007-2019, All Rights Reserved
2+
# -*- coding: utf-8 -*-
3+
14
import datetime
25
import os
36
import time
@@ -86,46 +89,12 @@ def build_timeslots(meeting,room=None):
8689
location=room,
8790
duration=t.duration)
8891

89-
def build_nonsession(meeting,schedule):
90-
'''
91-
This function takes a meeting object and creates non-session records
92-
for a new meeting, based on the last meeting
93-
'''
94-
last_meeting = get_last_meeting(meeting)
95-
if not last_meeting:
96-
return None
97-
98-
delta = meeting.date - last_meeting.date
99-
system = Person.objects.get(name='(System)')
100-
101-
for slot in TimeSlot.objects.filter(meeting=last_meeting,type__in=('break','reg','other','plenary','lead')):
102-
new_time = slot.time + delta
103-
session = Session.objects.create(meeting=meeting,
104-
name=slot.name,
105-
short=get_session(slot).short,
106-
group=get_session(slot).group,
107-
requested_by=system,
108-
status_id='sched',
109-
type=slot.type)
110-
111-
ts = TimeSlot.objects.create(type=slot.type,
112-
meeting=meeting,
113-
name=slot.name,
114-
time=new_time,
115-
duration=slot.duration,
116-
show_location=slot.show_location)
117-
SchedTimeSessAssignment.objects.create(schedule=schedule,session=session,timeslot=ts)
118-
11992
def check_nonsession(meeting,schedule):
12093
'''
12194
Ensure non-session timeslots exist and have appropriate SchedTimeSessAssignment objects
12295
for the specified schedule.
12396
'''
12497
slots = TimeSlot.objects.filter(meeting=meeting,type__in=('break','reg','other','plenary','lead','offagenda'))
125-
if not slots:
126-
build_nonsession(meeting,schedule)
127-
return None
128-
12998
plenary = slots.filter(type='plenary').first()
13099
if plenary:
131100
assignments = plenary.sessionassignments.all()
@@ -269,9 +238,6 @@ def add(request):
269238
meeting.save()
270239

271240
populate_important_dates(meeting)
272-
273-
# copy special sessions from previous meeting
274-
build_nonsession(meeting,schedule)
275241

276242
# Create Physical new meeting directory and subdirectories
277243
make_materials_directories(meeting)

0 commit comments

Comments
 (0)