aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/entry.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/qc_app/entry.py b/qc_app/entry.py
index d876bb7..7f67a33 100644
--- a/qc_app/entry.py
+++ b/qc_app/entry.py
@@ -24,7 +24,7 @@ def errors(request) -> Tuple[str, ...]:
def __filetype_error__():
return (
("Invalid file type provided.",)
- if request.form["filetype"] not in ("average", "standard-error")
+ if request.form.get("filetype") not in ("average", "standard-error")
else tuple())
def __file_missing_error__():
@@ -76,10 +76,10 @@ def zip_file_errors(filepath, upload_dir) -> Tuple[str, ...]:
@entrybp.route("/", methods=["GET", "POST"])
def upload_file():
"""Enables uploading the files"""
- upload_dir = app.config["UPLOAD_FOLDER"]
if request.method == "GET":
return render_template("index.html")
+ upload_dir = app.config["UPLOAD_FOLDER"]
request_errors = errors(request)
if request_errors:
for error in request_errors: