From 7d93c9ebc5864902bbebb17a4d1572932f69b5bf Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Tue, 14 Feb 2023 18:12:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=B8=8D=E5=88=86=E9=A1=B5=E6=97=B6=EF=BC=8Capi=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/api/user.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/users/api/user.py b/apps/users/api/user.py index 69ee41785..4457ab624 100644 --- a/apps/users/api/user.py +++ b/apps/users/api/user.py @@ -53,8 +53,9 @@ class UserViewSet(CommonApiMixin, UserQuerysetMixin, SuggestionMixin, BulkModelV return queryset def paginate_queryset(self, queryset): - queryset = super().paginate_queryset(queryset) or queryset - return self.set_users_roles_for_cache(queryset) + page = super().paginate_queryset(queryset) + self.set_users_roles_for_cache(page or queryset) + return page @action(methods=['get'], detail=False, url_path='suggestions') def match(self, request, *args, **kwargs):