diff options
author | Frederick Muriuki Muriithi | 2024-09-26 11:33:38 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-09-26 11:33:38 -0500 |
commit | c542cecda4c7c21bde7668f19a1b3e20f9a2b7b9 (patch) | |
tree | d105c7c024ebefd3d6a9db8cf0c96b6f25e98072 /uploader | |
parent | dc062fc61edac7a7333c7f3e6f3ed8f2c9961a44 (diff) | |
download | gn-uploader-c542cecda4c7c21bde7668f19a1b3e20f9a2b7b9.tar.gz |
Send the dataset ID. Fix bugs.
Diffstat (limited to 'uploader')
-rw-r--r-- | uploader/genotypes/views.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/uploader/genotypes/views.py b/uploader/genotypes/views.py index 7b5994e..9f08ca6 100644 --- a/uploader/genotypes/views.py +++ b/uploader/genotypes/views.py @@ -1,4 +1,5 @@ """Views for the genotypes.""" +from requests.models import Response from MySQLdb.cursors import DictCursor from flask import (flash, request, @@ -171,7 +172,7 @@ def create_dataset(species: dict, population: dict, **kwargs):# pylint: disable= activelink="create-dataset") form = request.form - _new_dataset = save_new_dataset( + new_dataset = save_new_dataset( cursor, population["Id"], form["geno-dataset-name"], @@ -179,7 +180,7 @@ def create_dataset(species: dict, population: dict, **kwargs):# pylint: disable= form["geno-dataset-shortname"]) def __success__(_success): - flash("Successfully created genotype dataset." "alert-success") + flash("Successfully created genotype dataset.", "alert-success") return redirect(url_for( "species.populations.genotypes.list_genotypes", species_id=species["SpeciesId"], @@ -206,6 +207,7 @@ def create_dataset(species: dict, population: dict, **kwargs):# pylint: disable= **dict(request.form), "species_id": species["SpeciesId"], "population_id": population["Id"], + "dataset_id": new_dataset["Id"], "dataset_name": form["geno-dataset-name"], "dataset_fullname": form["geno-dataset-fullname"], "dataset_shortname": form["geno-dataset-shortname"], |