diff options
| author | Frederick Muriuki Muriithi | 2026-09-10 14:16:30 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-09-10 17:43:07 -0500 |
| commit | 83d4de83a03ee8b9f4d7bb5cdb9ed457afb136a7 (patch) | |
| tree | d5329330ab0e44d3a3c2c77f4d03e48607a41b56 /uploader/genotypes/views.py | |
| parent | b1a6d9f5cd8276f637d651602f49d3f829218a9f (diff) | |
| download | gn-uploader-83d4de83a03ee8b9f4d7bb5cdb9ed457afb136a7.tar.gz | |
Bugfix: Update links and argument after previous commits.
Diffstat (limited to 'uploader/genotypes/views.py')
| -rw-r--r-- | uploader/genotypes/views.py | 12 |
1 files changed, 7 insertions, 5 deletions
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 "/<int:species_id>/populations/<int:population_id>/genotypes/<int:dataset_id>/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)) |
