From 659d96c2ad78bd3d0adefd6774f9a7fa1617a06a Mon Sep 17 00:00:00 2001 From: youichiro Date: Wed, 18 Aug 2021 22:09:38 +0900 Subject: [PATCH] fix flake8 --- backend/api/views/example_state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/api/views/example_state.py b/backend/api/views/example_state.py index 2badef76..051232fb 100644 --- a/backend/api/views/example_state.py +++ b/backend/api/views/example_state.py @@ -20,7 +20,7 @@ class ExampleStateList(generics.ListCreateAPIView): queryset = ExampleState.objects.filter(example=self.kwargs['example_id']) if self.can_confirm_per_user: queryset = queryset.filter(confirmed_by=self.request.user) - current_user_role = RoleMapping.objects.get(user_id=self.request.user.id, project_id=self.kwargs['project_id']).role + current_user_role = RoleMapping.objects.get(user=self.request.user, project_id=self.kwargs['project_id']).role ids = [q.id for q in queryset if q.confirmed_user_role == current_user_role] queryset = queryset.filter(id__in=ids) return queryset