We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c8d8f3 commit 4c99a9aCopy full SHA for 4c99a9a
1 file changed
loading_sdk/sync_api/client.py
@@ -491,11 +491,7 @@ def get_total_thread_pages(self, thread_id):
491
return response
492
493
thread_start = response["data"]["posts"][-1]
494
- replies = thread_start["replies"]
495
-
496
- if replies < 1:
497
- replies = 1
498
+ replies = max(thread_start["replies"], 1)
499
pages = math.ceil(replies / POSTS_PER_PAGE)
500
501
return pages
0 commit comments