From 3ab73ddf84a2d1e6aefab6b8b61e1d6cd28b1056 Mon Sep 17 00:00:00 2001 From: Kersom <9053044+nixocio@users.noreply.github.com> Date: Mon, 21 Feb 2022 16:34:31 -0500 Subject: [PATCH] Fix TypeError when running a command on a host in a smart inventory (#11768) Fix TypeError when running a command on a host in a smart inventory See: https://github.com/ansible/awx/issues/11611 --- awx/api/views/mesh_visualizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/views/mesh_visualizer.py b/awx/api/views/mesh_visualizer.py index 741239cbfa..d2c04f0962 100644 --- a/awx/api/views/mesh_visualizer.py +++ b/awx/api/views/mesh_visualizer.py @@ -19,7 +19,7 @@ class MeshVisualizer(APIView): data = { 'nodes': InstanceNodeSerializer(Instance.objects.all(), many=True).data, - 'links': InstanceLinkSerializer(InstanceLink.objects.all(), many=True).data, + 'links': InstanceLinkSerializer(InstanceLink.objects.select_related('target', 'source'), many=True).data, } return Response(data)