projects
/
pgwui_bulk_upload
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e976ca
)
Validate zip file only when there is a uploaded file
author
Karl O. Pinc
<kop@karlpinc.com>
Mon, 18 Jan 2021 01:11:14 +0000
(19:11 -0600)
committer
Karl O. Pinc
<kop@karlpinc.com>
Mon, 18 Jan 2021 01:11:14 +0000
(19:11 -0600)
src/pgwui_bulk_upload/views/bulk_upload.py
patch
|
blob
|
history
diff --git
a/src/pgwui_bulk_upload/views/bulk_upload.py
b/src/pgwui_bulk_upload/views/bulk_upload.py
index 03a4e8b67f21133599c2550854e3574fd16388b3..ae13dd1a145fb59f5d727b48cf951a96c8265ff5 100644
(file)
--- a/
src/pgwui_bulk_upload/views/bulk_upload.py
+++ b/
src/pgwui_bulk_upload/views/bulk_upload.py
@@
-515,6
+515,8
@@
class BulkTableUploadHandler(BaseTableUploadHandler):
'''Validate the uploaded archive; un-archive it and save
a path to the decompressed archive. Return a list of errors.
'''
+ if self.uf['filename'] == '':
+ return [] # Don't bother, there is no uploaded file
fh = self.uf['localfh']
if not zipfile.is_zipfile(fh):
return [ex.NotAZipfileError(self.uf['filename'])]