From af9e7a86509dee829a323760a92d6e9ee97e274d Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Thu, 26 Oct 2017 11:29:44 +0200 Subject: [PATCH] =?UTF-8?q?Suppression=20de=20v=C3=A9rifications=20inutile?= =?UTF-8?q?s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- topologie/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/topologie/views.py b/topologie/views.py index 4561506a..dcfce4d9 100644 --- a/topologie/views.py +++ b/topologie/views.py @@ -445,10 +445,8 @@ def create_ports(request, switch_id): messages.error(request, "Ce switch ne peut avoir autant de ports.") return redirect("/topologie/switch/" + str(switch.id)) - if begin < s_begin: - b = range(begin, s_begin) - if end > s_end: - e = range(s_end+1, end+1) + b = range(begin, s_begin) + e = range(s_end+1, end+1) for i in itertools.chain(b,e): p = Port() p.switch = switch