mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 22:18:01 -03:30
Merge pull request #6045 from chrismeyersfsu/fix-hosts_list
return count, results, next, prev
This commit is contained in:
commit
a64f8a7660
@ -1740,10 +1740,9 @@ class HostList(ListCreateAPIView):
|
||||
|
||||
def list(self, *args, **kwargs):
|
||||
try:
|
||||
queryset = self.get_queryset()
|
||||
return super(HostList, self).list(*args, **kwargs)
|
||||
except Exception as e:
|
||||
return Response(dict(error=_(unicode(e))), context=self.get_serializer_context(), status=status.HTTP_400_BAD_REQUEST)
|
||||
return Response(dict(results=self.serializer_class(queryset, many=True, context=self.get_serializer_context()).data))
|
||||
return Response(dict(error=_(unicode(e))), status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
|
||||
class HostDetail(RetrieveUpdateDestroyAPIView):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user