From a3aae41a4c302c53ce571e2f404a01d52d3a3553 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Thu, 12 Oct 2017 23:25:05 +0200 Subject: [PATCH] Prefetch des interfaces. --- machines/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machines/views.py b/machines/views.py index d83b8d92..5c9e31e6 100644 --- a/machines/views.py +++ b/machines/views.py @@ -1205,7 +1205,7 @@ def service_servers(request): @permission_required('serveur') def ouverture_ports(request): r = {'ipv4':{}, 'ipv6':{}} - for o in OuverturePortList.objects.all().prefetch_related('ouvertureport_set'): + for o in OuverturePortList.objects.all().prefetch_related('ouvertureport_set').prefetch_related('interface_set'): pl = { "tcp_in":set(map(str,o.tcp_ports_in())), "tcp_out":set(map(str,o.tcp_ports_out())),