8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00

Optimisation de l'affichage des switchs

This commit is contained in:
Gabriel Detraz 2019-08-06 17:50:27 +02:00 committed by root
parent e17b28cae0
commit 84cab79d6f

View file

@ -310,7 +310,7 @@ def index_physical_grouping(request):
@can_view_all(ModelSwitch, ConstructorSwitch) @can_view_all(ModelSwitch, ConstructorSwitch)
def index_model_switch(request): def index_model_switch(request):
""" Affichage de l'ensemble des modèles de switches""" """ 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 constructor_switch_list = ConstructorSwitch.objects
model_switch_list = SortTable.sort( model_switch_list = SortTable.sort(
model_switch_list, model_switch_list,