8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 03:13:12 +00:00

Optimisation chargement des locaux

This commit is contained in:
Gabriel Detraz 2019-08-07 00:08:19 +02:00
parent 84cab79d6f
commit 0794056d19

View file

@ -267,9 +267,9 @@ def index_physical_grouping(request):
.prefetch_related(
'switch_set__interface_set__domain__extension'
))
building_list = Building.objects.all()
dormitory_list = Dormitory.objects.all()
switch_bay_list = SwitchBay.objects.select_related('building')
building_list = Building.objects.all().select_related('dormitory')
dormitory_list = Dormitory.objects.all().prefetch_related('building_set')
switch_bay_list = SwitchBay.objects.select_related('building__dormitory').prefetch_related('switch_set__interface_set__domain')
stack_list = SortTable.sort(
stack_list,
request.GET.get('col'),