This commit is contained in:
cbartondock 2021-11-10 08:59:23 -05:00
commit 7c016265d2
3 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ If applicable, add screenshots to help explain your problem.
- OS: [e.g. Windows 10/Raspberry Pi OS] - OS: [e.g. Windows 10/Raspberry Pi OS]
- Python version: [e.g. python2.7] - Python version: [e.g. python2.7]
- Calibre-Web version: [e.g. 0.6.8 or 087c4c59 (git rev-parse --short HEAD)]: - Calibre-Web version: [e.g. 0.6.8 or 087c4c59 (git rev-parse --short HEAD)]:
- Docker container: [None/Technosoft2000/LinuxServer]: - Docker container: [None/LinuxServer]:
- Special Hardware: [e.g. Rasperry Pi Zero] - Special Hardware: [e.g. Rasperry Pi Zero]
- Browser: [e.g. Chrome 83.0.4103.97, Safari 13.3.7, Firefox 68.0.1 ESR] - Browser: [e.g. Chrome 83.0.4103.97, Safari 13.3.7, Firefox 68.0.1 ESR]

View File

@ -780,7 +780,7 @@ class CalibreDB():
# read search results from calibre-database and return it (function is used for feed and simple search # read search results from calibre-database and return it (function is used for feed and simple search
def get_search_results(self, term, offset=None, order=None, limit=None, *join): def get_search_results(self, term, offset=None, order=None, limit=None, *join):
order = order[0] or [Books.sort] order = order[0] if order else [Books.sort]
pagination = None pagination = None
result = self.search_query(term, *join).order_by(*order).all() result = self.search_query(term, *join).order_by(*order).all()
result_count = len(result) result_count = len(result)

View File

@ -637,7 +637,7 @@ def render_language_books(page, name, order):
def render_read_books(page, are_read, as_xml=False, order=None): def render_read_books(page, are_read, as_xml=False, order=None):
sort = order[0] or [] sort = order[0] if order else []
if not config.config_read_column: if not config.config_read_column:
if are_read: if are_read:
db_filter = and_(ub.ReadBook.user_id == int(current_user.id), db_filter = and_(ub.ReadBook.user_id == int(current_user.id),
@ -1272,7 +1272,7 @@ def extend_search_term(searchterm,
def render_adv_search_results(term, offset=None, order=None, limit=None): def render_adv_search_results(term, offset=None, order=None, limit=None):
sort = order[0] or [db.Books.sort] sort = order[0] if order else [db.Books.sort]
pagination = None pagination = None
cc = get_cc_columns(filter_config_custom_read=True) cc = get_cc_columns(filter_config_custom_read=True)