From 27e4179f397922d679b14cb96724e6e11022caf7 Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Fri, 10 May 2024 10:41:07 +0530 Subject: [PATCH] Fix Application import fails in cross tenant scenarios when import with subscriptions. Fixes https://github.com/wso2/api-manager/issues/2688 --- .../wso2/carbon/apimgt/rest/api/store/v1/utils/ImportUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/utils/ImportUtils.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/utils/ImportUtils.java index 03f88b15c196..a6bcbd2c4f7e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/utils/ImportUtils.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/utils/ImportUtils.java @@ -173,7 +173,7 @@ public static List importSubscriptions(Set if (!StringUtils.isEmpty(tenantDomain) && APIUtil.isTenantAvailable(tenantDomain)) { String uuidFromIdentifier = ApiMgtDAO.getInstance().getUUIDFromIdentifier(apiIdentifier, tenantDomain); if (StringUtils.isNotEmpty(uuidFromIdentifier)) { - ApiTypeWrapper apiTypeWrapper = apiConsumer.getAPIorAPIProductByUUID(uuidFromIdentifier, organization); + ApiTypeWrapper apiTypeWrapper = apiConsumer.getAPIorAPIProductByUUID(uuidFromIdentifier, tenantDomain); // Tier of the imported subscription String targetTier = subscribedAPI.getThrottlingPolicy(); // Checking whether the target tier is available