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 5f4d5d950f3c..22b03f61d320 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 @@ -5315,17 +5315,16 @@ public API addPolicyTypeFieldToApi(API api, String tenantDomain) } api.setUriTemplates(uriTemplates); - if (isAPILevelPolicySupportEnabled) { - List<OperationPolicy> apiPolicies = api.getApiPolicies(); - if (apiPolicies != null && !apiPolicies.isEmpty()) { - for (OperationPolicy policy : apiPolicies) { - String policyType = getPolicyType(policy, api.getUuid(), - tenantDomain); - policy.setPolicyType(policyType); - } + List<OperationPolicy> apiPolicies = api.getApiPolicies(); + if (apiPolicies != null && !apiPolicies.isEmpty()) { + for (OperationPolicy policy : apiPolicies) { + String policyType = getPolicyType(policy, api.getUuid(), + tenantDomain); + policy.setPolicyType(policyType); } - api.setApiPolicies(apiPolicies); } + api.setApiPolicies(apiPolicies); + return api; }