From e3bc54e7642fce4c56091d047942e673e23eda5d Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Fri, 11 Mar 2022 19:31:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BB=84=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=20(#7809)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: feng626 <1304903146@qq.com> --- apps/users/api/relation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/users/api/relation.py b/apps/users/api/relation.py index 40f5566ae..23260a5ae 100644 --- a/apps/users/api/relation.py +++ b/apps/users/api/relation.py @@ -5,12 +5,13 @@ from django.db.models import F from common.drf.api import JMSBulkRelationModelViewSet from .. import serializers -from ..models import User +from ..models import User, UserGroup __all__ = ['UserUserGroupRelationViewSet'] class UserUserGroupRelationViewSet(JMSBulkRelationModelViewSet): + perm_model = UserGroup filterset_fields = ('user', 'usergroup') search_fields = filterset_fields serializer_class = serializers.UserUserGroupRelationSerializer