Avoid trying to open meeting documents with empty .uploaded_filename.

- Legacy-Id: 17417
This commit is contained in:
Henrik Levkowetz 2020-03-10 17:59:56 +00:00
parent 50e8918a56
commit 60e302ab5a

View file

@ -223,7 +223,7 @@ def read_session_file(type, num, doc):
#
# FIXME: uploaded_filename should be replaced with a function call that computes names that are fixed
path = os.path.join(settings.AGENDA_PATH, "%s/%s/%s" % (num, type, doc.uploaded_filename))
if os.path.exists(path):
if doc.uploaded_filename and os.path.exists(path):
with io.open(path, 'rb') as f:
return f.read(), path
else: