fixed "next page" visibility bug
This commit is contained in:
parent
fd653868ab
commit
20a6b713f6
1 changed files with 2 additions and 2 deletions
|
@ -1052,7 +1052,7 @@ def show_one_poll(bobo_request, poll_hash_for_admin=None, poll_hash=None,
|
||||||
try:
|
try:
|
||||||
count = int(count)
|
count = int(count)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
count = 100
|
count = 50
|
||||||
count = max(1, min(count, 1000))
|
count = max(1, min(count, 1000))
|
||||||
try:
|
try:
|
||||||
page = int(page)
|
page = int(page)
|
||||||
|
@ -1063,7 +1063,7 @@ def show_one_poll(bobo_request, poll_hash_for_admin=None, poll_hash=None,
|
||||||
poll_id = get_poll_id(poll_hash)
|
poll_id = get_poll_id(poll_hash)
|
||||||
if not poll_id is None:
|
if not poll_id is None:
|
||||||
poll = Poll.get(poll_id)
|
poll = Poll.get(poll_id)
|
||||||
page = min(page, (poll.get_num_of_submissions() - 1) / count)
|
page = min(page, 1 + (poll.get_num_of_submissions() - 1) / count)
|
||||||
value_dict["poll"] = poll
|
value_dict["poll"] = poll
|
||||||
value_dict["page"] = page
|
value_dict["page"] = page
|
||||||
value_dict["count"] = count
|
value_dict["count"] = count
|
||||||
|
|
Loading…
Reference in a new issue