mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 19:08:21 +00:00
Fixed bug in publinkadmin pagination
This commit is contained in:
@@ -393,8 +393,10 @@ def sys_publink_admin(request):
|
|||||||
current_page = 1
|
current_page = 1
|
||||||
per_page = 100
|
per_page = 100
|
||||||
|
|
||||||
publinks = FileShare.objects.all()[per_page * (current_page -1):
|
offset = per_page * (current_page -1)
|
||||||
per_page + 1]
|
limit = per_page + 1
|
||||||
|
publinks = FileShare.objects.all()[offset:offset+limit]
|
||||||
|
|
||||||
if len(publinks) == per_page + 1:
|
if len(publinks) == per_page + 1:
|
||||||
page_next = True
|
page_next = True
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user