Skip to content

Commit 05e2da9

Browse files
author
Matthew Elwell
authored
Grab the environment before querying the identities (#176)
1 parent f3d7fb0 commit 05e2da9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

api/environments/identities/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class IdentityViewSet(viewsets.ModelViewSet):
2727
pagination_class = CustomPagination
2828

2929
def get_queryset(self):
30-
environment_api_key = self.kwargs["environment_api_key"]
31-
queryset = Identity.objects.filter(environment__api_key=environment_api_key)
30+
environment = self.get_environment_from_request()
31+
queryset = Identity.objects.filter(environment=environment)
3232

3333
search_query = self.request.query_params.get("q")
3434
if search_query:

0 commit comments

Comments
 (0)