diff options
| author | Frederick Muriuki Muriithi | 2025-07-08 16:05:40 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2025-07-08 16:05:40 -0500 |
| commit | 3f658b0af6d3cf84a686c8d7eb948929520e6323 (patch) | |
| tree | 021c05b42c551417e117b4965ce64813b4d50781 /uploader/population/views.py | |
| parent | 7316e4a3bacaa1c4984fb2068fac1de9f839edf4 (diff) | |
| download | gn-uploader-3f658b0af6d3cf84a686c8d7eb948929520e6323.tar.gz | |
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.
Diffstat (limited to 'uploader/population/views.py')
| -rw-r--r-- | uploader/population/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 }) |
