about summary refs log tree commit diff
path: root/uploader/phenotypes
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/phenotypes')
-rw-r--r--uploader/phenotypes/views.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py
index c0ab493..bcbb3a9 100644
--- a/uploader/phenotypes/views.py
+++ b/uploader/phenotypes/views.py
@@ -89,14 +89,18 @@ def select_population(species: dict, **kwargs):# pylint: disable=[unused-argumen
         if not bool(request.args.get("population_id")):
             return render_template("phenotypes/select-population.html",
                                    species=species,
-                                   populations=order_by_family(
-                                       populations_by_species(
-                                           conn, species["SpeciesId"]),
-                                       order_key="FamilyOrder"),
+                                   populations=populations_by_species(
+                                       conn, species["SpeciesId"]),
                                    activelink="phenotypes")
 
+        population_id = request.args["population_id"]
+        if population_id == "CREATE-POPULATION":
+            return redirect(url_for(
+                "species.populations.create_population",
+                species_id=species["SpeciesId"],
+                return_to="species.populations.phenotypes.list_datasets"))
         population = population_by_species_and_id(
-            conn, species["SpeciesId"], int(request.args["population_id"]))
+            conn, species["SpeciesId"], int(population_id))
         if not bool(population):
             flash("No such population found!", "alert-danger")
             return redirect(url_for(