Show 404 for meeting agendas too far in the future.

- Legacy-Id: 14254
This commit is contained in:
Henrik Levkowetz 2017-11-01 10:52:52 +00:00
parent a6a99dc23d
commit cf6143cce7

View file

@ -445,12 +445,15 @@ def agenda(request, num=None, name=None, base=None, ext=None, owner=None, utc=""
assert num is None or num.isdigit()
current = get_ietf_meeting()
meeting = get_ietf_meeting(num)
if int(meeting.number) > int(current.number):
raise Http404("Meeting too far in the future")
if not meeting or (meeting.number.isdigit() and int(meeting.number) <= 64 and not meeting.agenda.assignments.exists()):
if ext == '.html':
return HttpResponseRedirect( 'https://www.ietf.org/proceedings/%s' % num )
else:
raise Http404
raise Http404(No such meeting")
if name is None:
schedule = get_schedule(meeting, name)