Fix for #3021 (speed of calculating number of pages)
This commit is contained in:
parent
fcc95bd895
commit
15952a764c
|
@ -839,8 +839,7 @@ class CalibreDB:
|
|||
entries = list()
|
||||
pagination = list()
|
||||
try:
|
||||
pagination = Pagination(page, pagesize,
|
||||
len(query.all()))
|
||||
pagination = Pagination(page, pagesize, query.count())
|
||||
entries = query.order_by(*order).offset(off).limit(pagesize).all()
|
||||
except Exception as ex:
|
||||
log.error_or_exception(ex)
|
||||
|
|
Loading…
Reference in New Issue
Block a user