From 84cab79d6f784b69a14b28373bede27f3219f80a Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 6 Aug 2019 17:50:27 +0200 Subject: [PATCH] Optimisation de l'affichage des switchs --- topologie/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topologie/views.py b/topologie/views.py index 9781a7d2..97b430fc 100644 --- a/topologie/views.py +++ b/topologie/views.py @@ -310,7 +310,7 @@ def index_physical_grouping(request): @can_view_all(ModelSwitch, ConstructorSwitch) def index_model_switch(request): """ Affichage de l'ensemble des modèles de switches""" - model_switch_list = ModelSwitch.objects.select_related('constructor') + model_switch_list = ModelSwitch.objects.select_related('constructor').prefetch_related('switch_set__interface_set__domain') constructor_switch_list = ConstructorSwitch.objects model_switch_list = SortTable.sort( model_switch_list,