aboutsummaryrefslogtreecommitdiff
path: root/uploader/platforms/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/platforms/views.py')
-rw-r--r--uploader/platforms/views.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/uploader/platforms/views.py b/uploader/platforms/views.py
index 56390ab..1abf52e 100644
--- a/uploader/platforms/views.py
+++ b/uploader/platforms/views.py
@@ -48,9 +48,7 @@ def list_platforms(species_id: int):
flash("No species provided.", "alert-danger")
return redirect(url_for("species.platforms.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)
return render_template(
"platforms/list-platforms.html",