From 13de8c6ff426512b5b7d7cee71acc0aeae28cd31 Mon Sep 17 00:00:00 2001 From: Olga Matyla Date: Tue, 14 Jan 2025 16:05:12 +0100 Subject: [PATCH] Add securityscan to select related --- src/ralph/virtual/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ralph/virtual/api.py b/src/ralph/virtual/api.py index a609f73494..559afb8398 100644 --- a/src/ralph/virtual/api.py +++ b/src/ralph/virtual/api.py @@ -237,7 +237,7 @@ class CloudHostViewSet(BaseObjectViewSetMixin, RalphAPIViewSet): select_related = [ 'parent', 'parent__cloudproject', 'cloudprovider', 'hypervisor', 'service_env__service', 'service_env__environment', 'content_type', - 'configuration_path__module', + 'configuration_path__module', 'securityscan' ] prefetch_related = base_object_descendant_prefetch_related + [ 'tags', 'cloudflavor__virtualcomponent_set__model', 'licences', @@ -280,7 +280,7 @@ class VirtualServerViewSet(BaseObjectViewSetMixin, RalphAPIViewSet): save_serializer_class = VirtualServerSaveSerializer select_related = VirtualServerAdmin.list_select_related + [ 'parent', 'service_env__service', 'service_env__environment', - 'configuration_path', 'content_type', 'parent__cluster__type' + 'configuration_path', 'content_type', 'parent__cluster__type', 'securityscan' ] prefetch_related = base_object_descendant_prefetch_related + [ 'tags',