mirror of https://github.com/jumpserver/jumpserver
fix: 用户接口不分页时,api异常
parent
ac4a321225
commit
7d93c9ebc5
|
@ -53,8 +53,9 @@ class UserViewSet(CommonApiMixin, UserQuerysetMixin, SuggestionMixin, BulkModelV
|
||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
def paginate_queryset(self, queryset):
|
def paginate_queryset(self, queryset):
|
||||||
queryset = super().paginate_queryset(queryset) or queryset
|
page = super().paginate_queryset(queryset)
|
||||||
return self.set_users_roles_for_cache(queryset)
|
self.set_users_roles_for_cache(page or queryset)
|
||||||
|
return page
|
||||||
|
|
||||||
@action(methods=['get'], detail=False, url_path='suggestions')
|
@action(methods=['get'], detail=False, url_path='suggestions')
|
||||||
def match(self, request, *args, **kwargs):
|
def match(self, request, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue