From 83d4de83a03ee8b9f4d7bb5cdb9ed457afb136a7 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 10 Sep 2026 14:16:30 -0500 Subject: Bugfix: Update links and argument after previous commits. --- uploader/genotypes/views.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'uploader') diff --git a/uploader/genotypes/views.py b/uploader/genotypes/views.py index c18c330..2a0e0f8 100644 --- a/uploader/genotypes/views.py +++ b/uploader/genotypes/views.py @@ -90,8 +90,9 @@ def index(species: dict, population: dict, **kwargs):# pylint: disable=[unused-a "//populations//genotypes//list-markers", methods=["GET"]) @require_login -@with_species(redirect_uri="species.populations.genotypes.list_genotypes") -def list_markers(species: dict, **_kwargs): +@with_population(species_redirect_uri="species.list_species", + redirect_uri="species.populations.index") +def list_markers(species: dict, population: dict, **_kwargs): """List the markers that exist for this species.""" args = request.args offset = int(args.get("start") or 0) @@ -99,11 +100,12 @@ def list_markers(species: dict, **_kwargs): markers, total_records = genotype_markers( conn, species["SpeciesId"], + population["Id"], offset=offset, limit=int(args.get("length") or 0)) return jsonify({ - **({"draw": int(args.get("draw"))} - if bool(args.get("draw") or False) + **({"draw": int(args.get("draw", "0"))} + if bool(args.get("draw")) else {}), "recordsTotal": total_records, "recordsFiltered": len(markers), @@ -176,7 +178,7 @@ def create_dataset(species: dict, population: dict, **kwargs):# pylint: disable= form["geno-dataset-name"], form["geno-dataset-fullname"], form["geno-dataset-shortname"])) - except Exception: + except Exception:# pylint: disable=[broad-exception-caught] msg = "Error adding new Genotype dataset to database." logger.error(msg, exc_info=True) return Left(Exception(msg)) -- cgit 1.4.1