mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 10:27:34 -02:30
return count, results, next, prev
* This returns /api/vx/hosts/ to having all the nice response items like count, results, next, prev. I had "chopped" that off by explicitly only returning result.
This commit is contained in:
@@ -1712,10 +1712,9 @@ class HostList(ListCreateAPIView):
|
|||||||
|
|
||||||
def list(self, *args, **kwargs):
|
def list(self, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
queryset = self.get_queryset()
|
return super(HostList, self).list(*args, **kwargs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return Response(dict(error=_(unicode(e))), context=self.get_serializer_context(), status=status.HTTP_400_BAD_REQUEST)
|
return Response(dict(error=_(unicode(e))), status=status.HTTP_400_BAD_REQUEST)
|
||||||
return Response(dict(results=self.serializer_class(queryset, many=True, context=self.get_serializer_context()).data))
|
|
||||||
|
|
||||||
|
|
||||||
class HostDetail(RetrieveUpdateDestroyAPIView):
|
class HostDetail(RetrieveUpdateDestroyAPIView):
|
||||||
|
|||||||
Reference in New Issue
Block a user