From 3f658b0af6d3cf84a686c8d7eb948929520e6323 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 8 Jul 2025 16:05:40 -0500 Subject: Fix entry/selection of population families. Populations can be grouped into families for presentation in the menus. They can also be left ungrouped. These "families" are general categories of data, whose only effect is to present the selection of the populations from the menus in a more organised form. The families can also differ from species to species, though there are some very general categories that span multiple (all?) species. This commit takes all the above into consideration, relaxing the entry constraints and making entry of the families a lot more flexible. --- uploader/population/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'uploader/population/views.py') diff --git a/uploader/population/views.py b/uploader/population/views.py index 270dd5f..87a33d9 100644 --- a/uploader/population/views.py +++ b/uploader/population/views.py @@ -100,7 +100,7 @@ def create_population(species_id: int): return render_template( "populations/create-population.html", species=species, - families = population_families(conn), + families = population_families(conn, species["SpeciesId"]), genetic_types = population_genetic_types(conn), mapping_methods=( {"id": "0", "value": "No mapping support"}, @@ -153,7 +153,7 @@ def create_population(species_id: int): "FullName": population_fullname, "InbredSetCode": request.form.get("population_code") or None, "Description": request.form.get("population_description") or None, - "Family": request.form.get("population_family") or None, + "Family": request.form.get("population_family").strip() or None, "MappingMethodId": request.form.get("population_mapping_method_id"), "GeneticType": request.form.get("population_genetic_type") or None }) -- cgit v1.2.3