Skip to content

Commit 51618f4

Browse files
committed
Move function in loop
1 parent 8b53d75 commit 51618f4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ansible_base/rbac/claims.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,8 @@ def _build_objects_and_roles(
138138
# Internal tracking for ansible_id to array position mapping
139139
ansible_id_to_index = defaultdict(dict) # { <model_type>: {<ansible_id>: <array_position> } }
140140

141-
role_assignments = get_user_object_roles(user)
142-
143141
# Single loop: build object_arrays and object_roles
144-
for assignment in role_assignments:
142+
for assignment in get_user_object_roles(user):
145143
role_name = assignment.rd_name
146144
ansible_id = str(assignment.aid)
147145
resource_name = str(assignment.resource_name)

0 commit comments

Comments
 (0)