From 572ce96af381eaf3898bcddacd65b4baeb7fedc9 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Thu, 13 Apr 2017 00:58:52 +0200 Subject: [PATCH] API views style fixes (pep8) --- api/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/views.py b/api/views.py index 9a72336..93a833a 100644 --- a/api/views.py +++ b/api/views.py @@ -34,7 +34,7 @@ def asblockFreeAS(request): num = block.asnumber_set.order_by("-number")[0].number + 1 if num > block.asEnd: num = None - for n in range(block.asBegin, block.asEnd+1): + for n in range(block.asBegin, block.asEnd + 1): try: ASNumber.objects.get(number=n) except ASNumber.DoesNotExist: @@ -62,7 +62,6 @@ def freeSubnet(request): "errorMsg": None, "network": None, } - try: parentRangeName = request.GET.get('parentRange', None) @@ -194,6 +193,7 @@ def checkDomain(request): return JsonResponse(ret) + @login_required def checkRzone(request): ret = { @@ -215,4 +215,3 @@ def checkRzone(request): ret["errorMsg"] = "ReverseZone does not exist" return JsonResponse(ret) -