Skip to content

Commit 189548e

Browse files
lakshmi2506jstvz
andauthored
Fix TypeError when permissionSetGroup has a mutingPermissionSet (#3834)
![image](https://github.com/user-attachments/assets/75aa4450-564a-4fa9-ae81-b200390d71e6) Fix the issue when the permissionSetGroup has a MutingPermissionSet, So the type of the PermissionSetId in the PermissionSetGroupComponent will be of type MutingPermissionSet Co-authored-by: James Estevez <jestevez@salesforce.com>
1 parent 4e48a6f commit 189548e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cumulusci/tasks/preflight/permsets.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ def _run_task(self):
99
for result in self.sf.query_all(query)["records"]:
1010
if result["PermissionSet"]["Name"] not in self.return_values:
1111
self.return_values.append(result["PermissionSet"]["Name"])
12-
1312
if result["PermissionSetGroupId"] is not None:
1413
psg_query = f"SELECT PermissionSet.Name from PermissionSetGroupComponent where PermissionSetGroupId = '{result['PermissionSetGroupId']}'"
1514
for psg_result in self.sf.query_all(psg_query)["records"]:
16-
if psg_result["PermissionSet"]["Name"] not in self.return_values:
15+
if (
16+
psg_result["PermissionSet"]
17+
and psg_result["PermissionSet"]["Name"]
18+
not in self.return_values
19+
):
1720
self.return_values.append(psg_result["PermissionSet"]["Name"])
1821

1922
permsets_str = "\n".join(self.return_values)

0 commit comments

Comments
 (0)