Skip to content

Commit

Permalink
Merge pull request #554 from SujanSanjula96/add-check
Browse files Browse the repository at this point in the history
Add empty check before updating IDP groups
  • Loading branch information
SujanSanjula96 authored Jun 6, 2024
2 parents 77d9cb9 + 003b3b5 commit 332d91e
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 332d91e

Please sign in to comment.