Kevin Hu
commited on
Commit
·
6e2640f
1
Parent(s):
a8facdf
Fix total number error. (#4339)
Browse files### What problem does this PR solve?
#4328
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
api/db/services/document_service.py
CHANGED
@@ -66,8 +66,8 @@ class DocumentService(CommonService):
|
|
66 |
else:
|
67 |
docs = docs.order_by(cls.model.getter_by(orderby).asc())
|
68 |
|
69 |
-
docs = docs.paginate(page_number, items_per_page)
|
70 |
count = docs.count()
|
|
|
71 |
return list(docs.dicts()), count
|
72 |
|
73 |
@classmethod
|
|
|
66 |
else:
|
67 |
docs = docs.order_by(cls.model.getter_by(orderby).asc())
|
68 |
|
|
|
69 |
count = docs.count()
|
70 |
+
docs = docs.paginate(page_number, items_per_page)
|
71 |
return list(docs.dicts()), count
|
72 |
|
73 |
@classmethod
|