API views style fixes (pep8)
This commit is contained in:
parent
f8ed94d725
commit
572ce96af3
|
@ -34,7 +34,7 @@ def asblockFreeAS(request):
|
||||||
num = block.asnumber_set.order_by("-number")[0].number + 1
|
num = block.asnumber_set.order_by("-number")[0].number + 1
|
||||||
if num > block.asEnd:
|
if num > block.asEnd:
|
||||||
num = None
|
num = None
|
||||||
for n in range(block.asBegin, block.asEnd+1):
|
for n in range(block.asBegin, block.asEnd + 1):
|
||||||
try:
|
try:
|
||||||
ASNumber.objects.get(number=n)
|
ASNumber.objects.get(number=n)
|
||||||
except ASNumber.DoesNotExist:
|
except ASNumber.DoesNotExist:
|
||||||
|
@ -63,7 +63,6 @@ def freeSubnet(request):
|
||||||
"network": None,
|
"network": None,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
parentRangeName = request.GET.get('parentRange', None)
|
parentRangeName = request.GET.get('parentRange', None)
|
||||||
if not parentRangeName:
|
if not parentRangeName:
|
||||||
|
@ -194,6 +193,7 @@ def checkDomain(request):
|
||||||
|
|
||||||
return JsonResponse(ret)
|
return JsonResponse(ret)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def checkRzone(request):
|
def checkRzone(request):
|
||||||
ret = {
|
ret = {
|
||||||
|
@ -215,4 +215,3 @@ def checkRzone(request):
|
||||||
ret["errorMsg"] = "ReverseZone does not exist"
|
ret["errorMsg"] = "ReverseZone does not exist"
|
||||||
|
|
||||||
return JsonResponse(ret)
|
return JsonResponse(ret)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue