Adapt session_draft_list() code to handle the case when there is multiple agendas for a given group acronym. Fixes some server 500 results when trying to get pdf bundles for the plenary sessions for ietf 71.
- Legacy-Id: 9502
This commit is contained in:
parent
cfc85de166
commit
d59af2aa0f
|
@ -467,17 +467,18 @@ def convert_to_pdf(doc_name):
|
|||
|
||||
def session_draft_list(num, session):
|
||||
try:
|
||||
agenda = Document.objects.filter(type="agenda",
|
||||
agendas = Document.objects.filter(type="agenda",
|
||||
session__meeting__number=num,
|
||||
session__group__acronym=session,
|
||||
states=State.objects.get(type="agenda", slug="active")).distinct().get()
|
||||
states=State.objects.get(type="agenda", slug="active")).distinct()
|
||||
except Document.DoesNotExist:
|
||||
raise Http404
|
||||
|
||||
drafts = set()
|
||||
content = read_agenda_file(num, agenda)
|
||||
if content:
|
||||
drafts.update(re.findall('(draft-[-a-z0-9]*)', content))
|
||||
for agenda in agendas:
|
||||
content = read_agenda_file(num, agenda)
|
||||
if content:
|
||||
drafts.update(re.findall('(draft-[-a-z0-9]*)', content))
|
||||
|
||||
result = []
|
||||
for draft in drafts:
|
||||
|
|
Loading…
Reference in a new issue