From 0ff83673e99a1163dfb9feb440d352879872eee7 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 19 Dec 2023 19:30:58 +0300 Subject: Bug: Commit population before trying to upload data. --- qc_app/samples.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'qc_app') diff --git a/qc_app/samples.py b/qc_app/samples.py index e1e88bd..d27164e 100644 --- a/qc_app/samples.py +++ b/qc_app/samples.py @@ -102,12 +102,13 @@ def create_population(): "Family": request.form.get("inbredset_family") or None, "Description": request.form.get("description") or None }) - flash("Grouping/Population created successfully.", "alert-success") - return render_template( - "samples/upload-samples.html", - species=species, - population=with_db_connection( - lambda conn: population_by_id(conn, pop_id))) + + flash("Grouping/Population created successfully.", "alert-success") + return render_template( + "samples/upload-samples.html", + species=species, + population=with_db_connection( + lambda conn: population_by_id(conn, pop_id))) @samples.route("/upload/select-population", methods=["POST"]) def select_population(): -- cgit v1.2.3