Browse Source

Policy Classifier update is failing

Change-Id: I142b9f02705be21141336a751a9204322ae93d98
Closes-Bug: #1589738
ank 2 years ago
parent
commit
47d2a569aa
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      gbpui/panels/application_policy/forms.py

+ 6
- 5
gbpui/panels/application_policy/forms.py View File

@@ -270,11 +270,12 @@ class UpdatePolicyClassifierForm(BaseUpdateForm):
270 270
         url = reverse('horizon:project:application_policy:index')
271 271
         try:
272 272
             policyclassifier_id = self.initial['policyclassifier_id']
273
-            protocol = context.get('protocol').lower()
274
-            if protocol in PROTOCOL_MAP:
275
-                context['protocol'] = PROTOCOL_MAP[protocol]
276
-            elif protocol == "any":
277
-                context['protocol'] = None
273
+            if 'protocol' in context:
274
+                protocol = context.get('protocol').lower()
275
+                if protocol in PROTOCOL_MAP:
276
+                    context['protocol'] = PROTOCOL_MAP[protocol]
277
+                elif protocol == "any":
278
+                    context['protocol'] = None
278 279
             if 'port_range' in context and context['port_range'] == '':
279 280
                 context['port_range'] = None
280 281
             if context.get('name'):

Loading…
Cancel
Save