Skip to content

Commit

Permalink
Merge pull request #2499 from homholueng/V3.6.X_bugfix_no_permission_…
Browse files Browse the repository at this point in the history
…data_no_parent

bugfix: 修复 gen_perms_apply_data 生成 parent instance 未处理 resource attributes 为 None 的问题
  • Loading branch information
normal-wls authored Aug 18, 2020
2 parents 92bc4e0 + 6598de1 commit 2c35565
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion iam/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def gen_perms_apply_data(system, subject, action_to_resources_list):
for resources in resources_list:
for resource in resources:
inst_item = []
topo_path = resource.attribute.get("_bk_iam_path_")
topo_path = None

if resource.attribute:
topo_path = resource.attribute.get("_bk_iam_path_")

if topo_path:
for part in topo_path[1:-1].split("/"):
Expand Down

0 comments on commit 2c35565

Please sign in to comment.