~sircmpwn/core.sr.ht

c1a9bb0625a629e91259b53a4a09afefecb11d51 — Drew DeVault 1 year, 8 months ago 58c872c 0.60.5
Prevent negative pagination terms
1 files changed, 2 insertions(+), 0 deletions(-)

M srht/flask.py
M srht/flask.py => srht/flask.py +2 -0
@@ 141,6 141,8 @@ def paginate_query(query, results_per_page=15):
            page = 0
    else:
        page = 0
    if page < 1:
        abort(400)
    query = query.limit(results_per_page).all()
    return query, {
        "total_pages": total_pages,