Improved the handling of the meeting materials page if unknown upload names without revision numbers are given.

- Legacy-Id: 18321
This commit is contained in:
Henrik Levkowetz 2020-07-30 14:30:46 +00:00
parent e4bc508abc
commit a693b9fe97

View file

@ -204,7 +204,7 @@ def materials_document(request, document, num=None, ext=None):
doc = Document.objects.filter(name=name).first()
# Handle edge case where the above name, rev splitter misidentifies the end of a document name as a revision mumber
if not doc:
name = name + '-' + rev
name = name + (('-' + rev) if rev else '')
rev = None
doc = get_object_or_404(Document, name=name)