Temporary fix for a potential server 500. Expecting a better fix from Ryan.

- Legacy-Id: 15959
This commit is contained in:
Henrik Levkowetz 2019-02-21 15:26:40 +00:00
parent b19370b98c
commit ccb9074bc7

View file

@ -329,7 +329,10 @@ def doc_navigate(request, date, name, nav):
target = name
docs = get_doc_list(agenda)
index = docs.index(doc)
if doc in docs:
index = docs.index(doc)
else:
return redirect('ietf.secr.telechat.views.doc_detail', date=date, name=name)
if nav == 'next' and index < len(docs) - 1:
target = docs[index + 1].name