From cec565563f159c3cc050f508b60667c8d3a51113 Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Fri, 11 Oct 2024 14:01:26 +0530 Subject: [PATCH] Fix the issue of policies not being attached when importing APIs which are exported from previous U2 levels --- .../main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java index 71c1267324cb..d21b79fca43e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java @@ -7092,7 +7092,7 @@ public String importOperationPolicyOfGivenType(OperationPolicyData importedPolic /*To handle scenarios where api is exported from a previous U2 version. API and Common policies with same name and same version is not supported there */ - importOperationPolicy(importedPolicyData, organization); + policyId = importOperationPolicy(importedPolicyData, organization); } else if (policyType.equalsIgnoreCase(ImportExportConstants.POLICY_TYPE_COMMON)) { existingOperationPolicy = getCommonOperationPolicyByPolicyName(importedSpec.getName(), importedSpec.getVersion(),organization, false);