Fix for #3021 (speed of calculating number of pages)

This commit is contained in:
Ozzie Isaacs 2024-04-07 18:49:18 +02:00
parent fcc95bd895
commit 15952a764c

View File

@ -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)