fix: dev: search bookmarks

This commit is contained in:
rachmadaniHaryono 2018-03-29 04:49:02 +08:00
parent 93bb1f108c
commit 29b5c13743

View File

@ -333,7 +333,12 @@ def search_bookmarks():
else:
pagination_total = len(result['bookmarks'])
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(
page=page, total=pagination_total, per_page=per_page,
search=False, record_name='bookmarks', bs_version=3