Skip to content

Commit

Permalink
Merge pull request #807 from uktrade/hotfix-pages-endpoint
Browse files Browse the repository at this point in the history
hotfix Improve speed of /api/pages/
  • Loading branch information
richtier authored Mar 9, 2020
2 parents 084863f + 129debe commit 2ffe95f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def get_object(self):
self.handle_activate_language(instance)
return instance

def listing_view(self, request):
queryset = self.filter_queryset(self.get_queryset())
data = queryset.values_list('pk', flat=True)
return Response(data)


class PagesOptionalDraftAPIEndpoint(APIEndpointBase):
pass
Expand Down

0 comments on commit 2ffe95f

Please sign in to comment.