8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +00:00

Prefetch des interfaces.

This commit is contained in:
Hugo LEVY-FALK 2017-10-12 23:25:05 +02:00
parent a2686bbf97
commit a3aae41a4c

View file

@ -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())),