aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/parse.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/qc_app/parse.py b/qc_app/parse.py
index e72a163..fa3c8cd 100644
--- a/qc_app/parse.py
+++ b/qc_app/parse.py
@@ -30,10 +30,11 @@ def parse():
flash("Invalid filetype provided", "alert-error")
errors = True
- filepath = os.path.join(app.config["UPLOAD_FOLDER"], filename)
- if not os.path.exists(filepath):
- flash("Selected file does not exist (any longer)", "alert-danger")
- errors = True
+ if filename:
+ filepath = os.path.join(app.config["UPLOAD_FOLDER"], filename)
+ if not os.path.exists(filepath):
+ flash("Selected file does not exist (any longer)", "alert-error")
+ errors = True
if errors:
return redirect(url_for("entry.upload_file"))