fix: dev: search bookmarks
This commit is contained in:
parent
93bb1f108c
commit
29b5c13743
@ -333,7 +333,12 @@ def search_bookmarks():
|
|||||||
else:
|
else:
|
||||||
pagination_total = len(result['bookmarks'])
|
pagination_total = len(result['bookmarks'])
|
||||||
bms = list(chunks(result['bookmarks'], per_page))
|
bms = list(chunks(result['bookmarks'], per_page))
|
||||||
result['bookmarks'] = bms[page-1]
|
try:
|
||||||
|
result['bookmarks'] = bms[page-1]
|
||||||
|
except IndexError as err:
|
||||||
|
current_app.logger.debug('{}:{}, result bookmarks:{}, page:{}'.format(
|
||||||
|
type(err), err, len(result['bookmarks']), page
|
||||||
|
))
|
||||||
pagination = Pagination(
|
pagination = Pagination(
|
||||||
page=page, total=pagination_total, per_page=per_page,
|
page=page, total=pagination_total, per_page=per_page,
|
||||||
search=False, record_name='bookmarks', bs_version=3
|
search=False, record_name='bookmarks', bs_version=3
|
||||||
|
Loading…
Reference in New Issue
Block a user