RelationActionEvent - check for existing tenant in case RELATION_DELETED

This commit is contained in:
Volodymyr Babak 2025-04-14 13:37:55 +03:00
parent 375792da19
commit 5653ac7f2f

View File

@ -168,7 +168,7 @@ public class EdgeEventSourcingListener {
public void handleEvent(RelationActionEvent event) { public void handleEvent(RelationActionEvent event) {
try { try {
TenantId tenantId = event.getTenantId(); TenantId tenantId = event.getTenantId();
if (!tenantId.isSysTenantId() && !tenantService.tenantExists(tenantId)) { if (ActionType.RELATION_DELETED.equals(event.getActionType()) && !tenantService.tenantExists(tenantId)) {
log.debug("[{}] Ignoring RelationActionEvent because tenant does not exist: {}", tenantId, event); log.debug("[{}] Ignoring RelationActionEvent because tenant does not exist: {}", tenantId, event);
return; return;
} }