mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Merge pull request #6036 from chrismeyersfsu/fix-hosts_v2
run host listing through v1 vs. v2 logic
This commit is contained in:
@@ -1714,8 +1714,8 @@ class HostList(ListCreateAPIView):
|
|||||||
try:
|
try:
|
||||||
queryset = self.get_queryset()
|
queryset = self.get_queryset()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return Response(dict(error=_(unicode(e))), status=status.HTTP_400_BAD_REQUEST)
|
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).data))
|
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