Skip to content

Commit

Permalink
Add empty check before updating IDP groups
Browse files Browse the repository at this point in the history
  • Loading branch information
SujanSanjula96 committed Jun 6, 2024
1 parent 77d9cb9 commit 003b3b5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ public RoleV2 createRole(RoleV2 role)
RoleBasicInfo roleBasicInfo =
roleManagementService.addRole(role.getDisplayName(), role.getUsers(), localGroupIds,
permissionList, audienceType, role.getAudienceValue(), tenantDomain);
roleManagementService.updateIdpGroupListOfRole(roleBasicInfo.getId(), idpGroupList, new ArrayList<>(),
tenantDomain);
if (isNotEmpty(idpGroupList)) {
roleManagementService.updateIdpGroupListOfRole(roleBasicInfo.getId(), idpGroupList, new ArrayList<>(),
tenantDomain);
}
RoleV2 createdRole = new RoleV2();
createdRole.setId(roleBasicInfo.getId());
String locationURI = SCIMCommonUtils.getSCIMRoleV2URL(roleBasicInfo.getId());
Expand Down

0 comments on commit 003b3b5

Please sign in to comment.