mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-09-12 01:03:09 +00:00
Remove useless variable in create_ports and give explicit name to s_end
.
This commit is contained in:
parent
7ddb627b6b
commit
c238a9a2fa
1 changed files with 2 additions and 3 deletions
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue