From 92f80bf040c51b0b46bb869bcfa64601abc11471 Mon Sep 17 00:00:00 2001 From: Maya Date: Fri, 25 Feb 2022 10:08:49 +0300 Subject: [PATCH] small fix --- cvat/apps/organizations/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cvat/apps/organizations/views.py b/cvat/apps/organizations/views.py index 72acd68c17ec..24b21f39954c 100644 --- a/cvat/apps/organizations/views.py +++ b/cvat/apps/organizations/views.py @@ -108,10 +108,10 @@ class MembershipViewSet(mixins.RetrieveModelMixin, mixins.DestroyModelMixin, queryset = Membership.objects.all() ordering = '-id' http_method_names = ['get', 'patch', 'delete', 'head', 'options'] - search_fields = ('user', 'role') - filter_fields = list(search_fields) + ['id'] + search_fields = ('user_name', 'role') + filter_fields = list(search_fields) + ['id', 'user_id'] ordering_fields = filter_fields - lookup_fields = {'user': 'user__id'} + lookup_fields = {'user': 'user__id', 'user_name': 'user__username'} iam_organization_field = 'organization' def get_serializer_class(self):