mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 00:43:46 +00:00
Moins de requêtes
This commit is contained in:
parent
af9e7a8650
commit
457a098406
1 changed files with 3 additions and 3 deletions
|
@ -425,9 +425,9 @@ def create_ports(request, switch_id):
|
||||||
s_begin = s_end = 0
|
s_begin = s_end = 0
|
||||||
nb_ports = switch.ports.count()
|
nb_ports = switch.ports.count()
|
||||||
if nb_ports > 0:
|
if nb_ports > 0:
|
||||||
ports = switch.ports.order_by('port')
|
ports = switch.ports.order_by('port').values('port')
|
||||||
s_begin = ports[0].port
|
s_begin = ports.first().get('port')
|
||||||
s_end = ports.last().port
|
s_end = ports.last().get('port')
|
||||||
|
|
||||||
port_form = CreatePortsForm(
|
port_form = CreatePortsForm(
|
||||||
request.POST or None,
|
request.POST or None,
|
||||||
|
|
Loading…
Reference in a new issue