8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-26 00:43:46 +00:00

Suppression de vérifications inutiles.

This commit is contained in:
Hugo LEVY-FALK 2017-10-26 11:29:44 +02:00
parent 3a0fcefae1
commit af9e7a8650

View file

@ -445,10 +445,8 @@ def create_ports(request, switch_id):
messages.error(request, "Ce switch ne peut avoir autant de ports.") messages.error(request, "Ce switch ne peut avoir autant de ports.")
return redirect("/topologie/switch/" + str(switch.id)) return redirect("/topologie/switch/" + str(switch.id))
if begin < s_begin: b = range(begin, s_begin)
b = range(begin, s_begin) e = range(s_end+1, end+1)
if end > s_end:
e = range(s_end+1, end+1)
for i in itertools.chain(b,e): for i in itertools.chain(b,e):
p = Port() p = Port()
p.switch = switch p.switch = switch