From 0390e37fd573a266921be3ec707a472d60971beb Mon Sep 17 00:00:00 2001 From: xinwen Date: Mon, 2 Nov 2020 16:40:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(orgs):=20relation=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/orgs/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/orgs/api.py b/apps/orgs/api.py index 0b63eeabf..8176405ac 100644 --- a/apps/orgs/api.py +++ b/apps/orgs/api.py @@ -2,6 +2,7 @@ # from django.utils.translation import ugettext as _ +from django.db.models import Q from rest_framework import status from rest_framework.views import Response from rest_framework_bulk import BulkModelViewSet @@ -72,6 +73,7 @@ class OrgMemberRelationBulkViewSet(JMSBulkRelationModelViewSet): m2m_field = Organization.members.field serializer_class = OrgMemberSerializer filterset_class = OrgMemberRelationFilterSet + search_fields = ('user__name', 'user__username', 'org__name') def perform_bulk_create(self, serializer): data = serializer.validated_data