mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-15 14:58:42 +00:00
fix: avoid AttributeError when default_limit is missing
This commit is contained in:
@@ -17,7 +17,7 @@ class MaxLimitOffsetPagination(LimitOffsetPagination):
|
||||
self.max_limit = view.page_max_limit
|
||||
|
||||
# 自定义的 api view,就默认不约束分页了
|
||||
if getattr(view, 'action') != 'list' and not getattr(view, 'default_limit'):
|
||||
if getattr(view, 'action', None) != 'list' and not getattr(view, 'default_limit', None):
|
||||
self.default_limit = None
|
||||
|
||||
if view and hasattr(view, 'page_default_limit'):
|
||||
|
Reference in New Issue
Block a user