From 75add682a8d63a30e947b6bcd8d2e5dfee06c297 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 18 Feb 2025 16:24:14 -0600 Subject: Use new searchable list tables with off-ramps for data creation. --- uploader/population/views.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'uploader/population/views.py') 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") -- cgit v1.2.3