From dfc870b5d6b1c263340b351477ceffe53bbf4e0b Mon Sep 17 00:00:00 2001 From: somindagamage Date: Fri, 2 Feb 2024 07:38:42 -0500 Subject: [PATCH] Fix error when saving the location attribute --- .../identity/scim2/common/listener/SCIMGroupResolver.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/listener/SCIMGroupResolver.java b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/listener/SCIMGroupResolver.java index d47cc6d5..3bf7766f 100644 --- a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/listener/SCIMGroupResolver.java +++ b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/listener/SCIMGroupResolver.java @@ -116,9 +116,9 @@ public boolean addGroup(Group group, UserStoreManager userStoreManager) throws U throw new UserStoreException(String.format("Error occurred while adding the group: %s in tenant: %s. " + "Unsupported Datetime formats provided in the request", groupWithDomain, tenantId), e); } - if (StringUtils.isNotBlank(group.getLastModifiedDate())) { - attributes.put(SCIMConstants.CommonSchemaConstants.LOCATION_URI, group.getLocation()); - } + String location = SCIMCommonUtils.getSCIMGroupURL(groupId); + attributes.put(SCIMConstants.CommonSchemaConstants.LOCATION_URI, location); + group.setLocation(location); // Update SCIM tables for storing meta information. GroupDAO groupDAO = new GroupDAO(); try {