Browse Source

Fix create-member while retrieving PTG details

Conditionally process prox_group_id and proxied_group_id.

Change-Id: Ic810c6a11a7e46e9b916eadda77a9157a6fa84c0
Closes-bug: #1627883
Sumit Naiksatam 2 years ago
parent
commit
72d30c8265
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      gbpui/panels/policytargets/workflows.py

+ 3
- 3
gbpui/panels/policytargets/workflows.py View File

@@ -429,10 +429,10 @@ class SetGroupAction(workflows.Action):
429 429
             pt_list = []
430 430
             pts = client.policy_target_list(request,
431 431
                 tenant_id=request.user.tenant_id)
432
-            proxy_groups = [pt.proxy_group_id for pt in pts
433
-                            if pt.proxy_group_id]
432
+            proxy_groups = [pt.get('proxy_group_id') for pt in pts
433
+                            if pt.get('proxy_group_id')]
434 434
             for pt in pts:
435
-                if pt.id in proxy_groups or pt.proxied_group_id:
435
+                if pt.id in proxy_groups or pt.get('proxied_group_id'):
436 436
                     continue
437 437
                 pt.set_id_as_name_if_empty()
438 438
                 subnet_dedails = None

Loading…
Cancel
Save