소스 검색

Reset to original version for PR

Neil Beadle 5 년 전
부모
커밋
1f4e7be02f
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      vycontrol/firewall/views.py

+ 4 - 5
vycontrol/firewall/views.py

@@ -53,11 +53,10 @@ def index(request):
     if firewall_all == False:
     if firewall_all == False:
         return redirect('firewall:firewall-create')
         return redirect('firewall:firewall-create')
 
 
-    if 'name' in firewall_all: 
-        for xitem in firewall_all['name']:
-            if 'default-action' in firewall_all['name'][xitem]:
-                firewall_all['name'][xitem]['default_action'] = firewall_all['name'][xitem]['default-action']
-                del firewall_all['name'][xitem]['default-action']
+    for xitem in firewall_all['name']:
+        if 'default-action' in firewall_all['name'][xitem]:
+            firewall_all['name'][xitem]['default_action'] = firewall_all['name'][xitem]['default-action']
+            del firewall_all['name'][xitem]['default-action']
 
 
     template = loader.get_template('firewall/list.html')
     template = loader.get_template('firewall/list.html')
     context = { 
     context = {