Skip to content

Commit

Permalink
Grab the environment before querying the identities (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell authored Jul 9, 2021
1 parent f3d7fb0 commit 05e2da9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/environments/identities/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class IdentityViewSet(viewsets.ModelViewSet):
pagination_class = CustomPagination

def get_queryset(self):
environment_api_key = self.kwargs["environment_api_key"]
queryset = Identity.objects.filter(environment__api_key=environment_api_key)
environment = self.get_environment_from_request()
queryset = Identity.objects.filter(environment=environment)

search_query = self.request.query_params.get("q")
if search_query:
Expand Down

0 comments on commit 05e2da9

Please sign in to comment.