aboutsummaryrefslogtreecommitdiff
path: root/qc_app/entry.py
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app/entry.py')
-rw-r--r--qc_app/entry.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/qc_app/entry.py b/qc_app/entry.py
index e7ed294..31d64ca 100644
--- a/qc_app/entry.py
+++ b/qc_app/entry.py
@@ -11,8 +11,6 @@ from flask import (
render_template,
current_app as app)
-from quality_control.parsing import FileType
-
entrybp = Blueprint("entry", __name__)
@entrybp.route("/", methods=["GET", "POST"])
@@ -40,12 +38,11 @@ def upload_file():
if errors:
return render_template("index.html")
- filetype = (
- FileType.AVERAGE if request.form["filetype"] == "average"
- else FileType.STANDARD_ERROR)
filename = secure_filename(text_file.filename)
if not os.path.exists(app.config["UPLOAD_FOLDER"]):
os.mkdir(app.config["UPLOAD_FOLDER"])
text_file.save(os.path.join(app.config["UPLOAD_FOLDER"], filename))
- return redirect(url_for("parse.parse_file", filename=filename))
+ return redirect(url_for(
+ "parse.parse", filename=filename,
+ filetype=request.form["filetype"]))