Skip to content

Commit b7cf789

Browse files
committed
Fetch tenant domain from apiEvent
1 parent feddeae commit b7cf789

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/notifier/ExternallyDeployedApiNotifier.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,12 @@ private void undeployApiWhenRetiring(APIEvent apiEvent) throws NotifierException
9292
try {
9393
APIProvider apiProvider = APIManagerFactory.getInstance().getAPIProvider(CarbonContext.
9494
getThreadLocalCarbonContext().getUsername());
95-
String organization = apiMgtDAO.getOrganizationByAPIUUID(apiId);
9695
List<APIRevisionDeployment> test = apiMgtDAO.getAPIRevisionDeploymentsByApiUUID(apiId);
9796

9897
for (APIRevisionDeployment deployment : test) {
9998
String deploymentEnv = deployment.getDeployment();
10099
if (gatewayEnvironments.containsKey(deploymentEnv)) {
101-
GatewayDeployer deployer = GatewayHolder.getTenantGatewayInstance(organization, deploymentEnv);
100+
GatewayDeployer deployer = GatewayHolder.getTenantGatewayInstance(apiEvent.tenantDomain, deploymentEnv);
102101
if (deployer != null) {
103102
try {
104103
String referenceArtifact = APIUtil.getApiExternalApiMappingReferenceByApiId(apiId,

0 commit comments

Comments
 (0)