Skip to content

Commit 3f65037

Browse files
committed
Get the leadership timeslots to show in the secr pages
- Legacy-Id: 8931
1 parent 47901e8 commit 3f65037

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

ietf/secr/meetings/forms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ class TimeSlotForm(forms.Form):
180180
class NonSessionForm(TimeSlotForm):
181181
short = forms.CharField(max_length=32,label='Short Name',help_text='Enter an abbreviated session name (used for material file names)',required=False)
182182
type = forms.ModelChoiceField(queryset=TimeSlotTypeName.objects.filter(slug__in=('other','reg','break','plenary')),empty_label=None)
183+
type = forms.ModelChoiceField(queryset=TimeSlotTypeName.objects.filter(used=True).exclude(slug__in=('session',)),empty_label=None)
183184
group = forms.ModelChoiceField(queryset=Group.objects.filter(acronym__in=('edu','ietf','iepg','tools','iesg','iab','iaoc')),help_text='Required for Session types: other, plenary',required=False)
184185
show_location = forms.BooleanField(required=False)
185186

ietf/secr/meetings/views.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def build_nonsession(meeting,schedule):
9595
system = Person.objects.get(name='(system)')
9696
secretariat = Group.objects.get(acronym='secretariat')
9797

98-
for slot in TimeSlot.objects.filter(meeting=last_meeting,type__in=('break','reg','other','plenary')):
98+
for slot in TimeSlot.objects.filter(meeting=last_meeting,type__in=('break','reg','other','plenary','lead')):
9999
new_time = slot.time + delta
100100
session = None
101101
# create Session object for Tutorials to hold materials
@@ -128,7 +128,7 @@ def check_nonsession(meeting,schedule):
128128
Ensure non-session timeslots exist and have appropriate ScheduledSession objects
129129
for the specified schedule.
130130
'''
131-
slots = TimeSlot.objects.filter(meeting=meeting,type__in=('break','reg','other','plenary'))
131+
slots = TimeSlot.objects.filter(meeting=meeting,type__in=('break','reg','other','plenary','lead'))
132132
if not slots:
133133
build_nonsession(meeting,schedule)
134134
return None
@@ -435,7 +435,7 @@ def non_session(request, meeting_id, schedule_name):
435435

436436
check_nonsession(meeting,schedule)
437437

438-
slots = TimeSlot.objects.filter(meeting=meeting,type__in=('break','reg','other','plenary')).order_by('-type__name','time')
438+
slots = TimeSlot.objects.filter(meeting=meeting,type__in=('break','reg','other','plenary','lead')).order_by('-type__name','time')
439439

440440
if request.method == 'POST':
441441
form = NonSessionForm(request.POST)
@@ -458,7 +458,7 @@ def non_session(request, meeting_id, schedule_name):
458458
duration=duration,
459459
show_location=form.cleaned_data['show_location'])
460460

461-
if timeslot.type.slug not in ('other','plenary'):
461+
if timeslot.type.slug not in ('other','plenary','lead'):
462462
group = Group.objects.get(acronym='secretariat')
463463

464464
# create associated Session object
@@ -501,7 +501,7 @@ def non_session_delete(request, meeting_id, schedule_name, slot_id):
501501
meeting = get_object_or_404(Meeting, number=meeting_id)
502502
# schedule = get_object_or_404(Schedule, meeting=meeting, name=schedule_name)
503503
slot = get_object_or_404(TimeSlot, id=slot_id)
504-
if slot.type_id in ('other','plenary'):
504+
if slot.type_id in ('other','plenary','lead'):
505505
scheduledsessions = slot.scheduledsession_set.filter(schedule__meeting=meeting)
506506
session_objects = [ x.session for x in scheduledsessions ]
507507
for session in session_objects:

0 commit comments

Comments
 (0)