From eb07b9fa8a7249b1d17632a4a73e133e6ac7ea75 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 24 Sep 2024 10:14:17 -0500 Subject: Lint: Get rid of extraneous if check. --- uploader/genotypes/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'uploader/genotypes') diff --git a/uploader/genotypes/views.py b/uploader/genotypes/views.py index d69dc28..9da4dec 100644 --- a/uploader/genotypes/views.py +++ b/uploader/genotypes/views.py @@ -115,9 +115,7 @@ def list_markers(species_id: int): flash("Invalid species provided!", "alert-danger") return redirect(url_for("species.populations.genotypes.index")) - start_from = safe_int(request.args.get("start_from") or 0) - if start_from < 0: - start_from = 0 + start_from = max(safe_int(request.args.get("start_from") or 0), 0) count = safe_int(request.args.get("count") or 20) markers = enumerate_sequence( genotype_markers(conn, species_id, offset=start_from, limit=count), -- cgit v1.2.3