mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 20:30:46 -03:30
Merge pull request #6036 from chrismeyersfsu/fix-hosts_v2
run host listing through v1 vs. v2 logic
This commit is contained in:
commit
880f4a77a4
@ -1714,8 +1714,8 @@ class HostList(ListCreateAPIView):
|
||||
try:
|
||||
queryset = self.get_queryset()
|
||||
except Exception as e:
|
||||
return Response(dict(error=_(unicode(e))), status=status.HTTP_400_BAD_REQUEST)
|
||||
return Response(dict(results=self.serializer_class(queryset, many=True).data))
|
||||
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))
|
||||
|
||||
|
||||
class HostDetail(RetrieveUpdateDestroyAPIView):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user