Return 404 if meeting materials not found.
- Legacy-Id: 14019
This commit is contained in:
parent
aaf3fa54d8
commit
2846a2d58d
|
@ -168,6 +168,8 @@ def materials_document(request, document, num=None, ):
|
|||
raise Http404("No such document for meeting %s" % num)
|
||||
filename = doc.get_file_name()
|
||||
basename = doc.get_base_name()
|
||||
if not os.path.exists(filename):
|
||||
raise Http404("File not found: %s" % filename)
|
||||
with open(filename, 'rb') as file:
|
||||
bytes = file.read()
|
||||
|
||||
|
|
Loading…
Reference in a new issue