Skip to content

Commit 000274c

Browse files
author
omame
committed
fix(api): using count without start results in pagination not working
1 parent 7f2cd9c commit 000274c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bob/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Constants used by bob.
33
"""
4-
__version__ = "2.7.3"
4+
__version__ = "2.7.4"
55

66
import random
77

cogs/webapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def question_list():
9595
questions = {i: q for i, q in questions.items() for r in q["responses"] if response_search in r["text"]}
9696
start = int(start) if start else None
9797
count = int(count) if count else None
98-
end = start + count if start is not None and count is not None else None
98+
end = start + count if start is not None and count is not None else count
9999
questions = {i: q for i, q in list(questions.items())[start:end]}
100100
return questions
101101

0 commit comments

Comments
 (0)