diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/LifeCycleUtils.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/LifeCycleUtils.java index ff933dbaa9c0..97b066c6cf2c 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/LifeCycleUtils.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/LifeCycleUtils.java @@ -427,7 +427,7 @@ private static List getOldPublishedAPIOrAPIProductList(ApiTypeWrappe APIVersionComparator versionComparator = new APIVersionComparator(); APIProductVersionComparator apiProductVersionComparator = new APIProductVersionComparator(); - if (apiTypeWrapper.isAPIProduct()) { + if (!apiTypeWrapper.isAPIProduct()) { List apiList; apiList = getAPIVersionsByProviderAndName(apiTypeWrapper.getId().getProviderName(), apiTypeWrapper.getId().getName());