Merge pull request #476 from rachmadaniHaryono/bugfix/bukuserver-page
fix: dev: index error on bookmark
This commit is contained in:
commit
35aa009bf9
@ -219,7 +219,10 @@ class BookmarkModelView(BaseModelView):
|
|||||||
bookmarks = sorted(bookmarks, key=lambda x: x[key_idx], reverse=sort_desc)
|
bookmarks = sorted(bookmarks, key=lambda x: x[key_idx], reverse=sort_desc)
|
||||||
count = len(bookmarks)
|
count = len(bookmarks)
|
||||||
if page_size and bookmarks:
|
if page_size and bookmarks:
|
||||||
bookmarks = list(chunks(bookmarks, page_size))[page]
|
try:
|
||||||
|
bookmarks = list(chunks(bookmarks, page_size))[page]
|
||||||
|
except IndexError:
|
||||||
|
bookmarks = []
|
||||||
data = []
|
data = []
|
||||||
for bookmark in bookmarks:
|
for bookmark in bookmarks:
|
||||||
bm_sns = SimpleNamespace(id=None, url=None, title=None, tags=None, description=None)
|
bm_sns = SimpleNamespace(id=None, url=None, title=None, tags=None, description=None)
|
||||||
|
Loading…
Reference in New Issue
Block a user