From 99faae5a7236b705d3049205bbbac7431f1fb177 Mon Sep 17 00:00:00 2001 From: pidgezero-one Date: Fri, 24 May 2024 21:36:46 -0400 Subject: [PATCH] add comment' --- openlibrary/plugins/upstream/account.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openlibrary/plugins/upstream/account.py b/openlibrary/plugins/upstream/account.py index 9911e2abd84..c3bd4b0c0f4 100644 --- a/openlibrary/plugins/upstream/account.py +++ b/openlibrary/plugins/upstream/account.py @@ -1136,6 +1136,8 @@ class my_follows(delegate.page): def GET(self, username, key=""): i = web.input(page=1) page_size = 25 + + # Force invalid page query params to default to the first page page = 1 if not i.page.isdigit() else max(1, int(i.page)) offset = (page - 1) * page_size