Fixed bug where an extra blank page would show on "latest" if number of quotes was divisible by 10

This commit is contained in:
socks 2017-04-20 18:34:41 +01:00
parent 2b17a55968
commit c29ad49dbb

View file

@ -79,7 +79,7 @@ def latest():
"latest.html", "latest.html",
title="Latest", title="Latest",
quotes=quotes, quotes=quotes,
numpages=1 + allquotes//10, numpages=1 + allquotes//10 if allquotes%10 != 0 else allquotes//10,
curpage=0, curpage=0,
page_type="latest" page_type="latest"
) )
@ -99,7 +99,7 @@ def latest_page(page):
"latest.html", "latest.html",
title="Latest - page {}".format(page), title="Latest - page {}".format(page),
quotes=quotes, quotes=quotes,
numpages=1 + allquotes//10, numpages=1 + allquotes//10 if allquotes%10 != 0 else allquotes//10,
curpage=page-1, curpage=page-1,
page_type="latest" page_type="latest"
) )