Gitlab sera mis à jours Dimanche 9 Août entre 16h et 17h. Une coupure de quelques minutes est à prévoir.

Commit c238a9a2 authored by klafyvel's avatar klafyvel

Remove useless variable in create_ports and give explicit name to `s_end`.

parent 7ddb627b
......@@ -535,11 +535,10 @@ def create_ports(request, switchid):
return redirect(reverse('topologie:index'))
first_port = getattr(switch.ports.order_by('port').first(), 'port', 1)
s_begin = first_port
s_end = switch.number + first_port - 1
last_port = switch.number + first_port - 1
port_form = CreatePortsForm(
request.POST or None,
initial={'begin': s_begin, 'end': s_end}
initial={'begin': first_port, 'end': last_port}
if port_form.is_valid():
begin = port_form.cleaned_data['begin']
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment