aboutsummaryrefslogtreecommitdiff
path: root/uploader/population/views.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-02-18 16:24:14 -0600
committerFrederick Muriuki Muriithi2025-02-18 16:24:14 -0600
commit75add682a8d63a30e947b6bcd8d2e5dfee06c297 (patch)
tree45879792ca984fc5ef20933172742e48e4a40d97 /uploader/population/views.py
parentc403183a504769af6b3aa25b5438e945efbc91ff (diff)
downloadgn-uploader-75add682a8d63a30e947b6bcd8d2e5dfee06c297.tar.gz
Use new searchable list tables with off-ramps for data creation.
Diffstat (limited to 'uploader/population/views.py')
-rw-r--r--uploader/population/views.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/uploader/population/views.py b/uploader/population/views.py
index 1ece35f..f42e547 100644
--- a/uploader/population/views.py
+++ b/uploader/population/views.py
@@ -49,7 +49,15 @@ def index():
if not bool(request.args.get("species_id")):
return render_template(
"populations/index.html",
- species=order_species_by_family(all_species(conn)))
+ species=all_species(conn),
+ activelink="populations")
+
+ species_id = request.args.get("species_id")
+ if species_id == "CREATE-SPECIES":
+ return redirect(url_for(
+ "species.create_species",
+ return_to="species.populations.list_species_populations"))
+
species = species_by_id(conn, request.args.get("species_id"))
if not bool(species):
flash("Invalid species identifier provided!", "alert-danger")