Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit da85cd92 authored by Levy--Falk Hugo's avatar Levy--Falk Hugo Committed by root

Moins de requêtes

parent 1c8a3a87
......@@ -425,9 +425,9 @@ def create_ports(request, switch_id):
s_begin = s_end = 0
nb_ports = switch.ports.count()
if nb_ports > 0:
ports = switch.ports.order_by('port')
s_begin = ports[0].port
s_end = ports.last().port
ports = switch.ports.order_by('port').values('port')
s_begin = ports.first().get('port')
s_end = ports.last().get('port')
port_form = CreatePortsForm(
request.POST or None,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment