diff --git a/web/service/client.go b/web/service/client.go index 964bf0d5..9d0dba85 100644 --- a/web/service/client.go +++ b/web/service/client.go @@ -678,6 +678,10 @@ func (s *ClientService) Delete(inboundSvc *InboundService, id int, keepTraffic b for _, ibId := range inboundIds { inbound, getErr := inboundSvc.GetInbound(ibId) if getErr != nil { + if errors.Is(getErr, gorm.ErrRecordNotFound) { + logger.Warningf("Delete: skipping orphan client_inbounds row for client_id=%d, inbound_id=%d (inbound missing)", id, ibId) + continue + } return needRestart, getErr } key := clientKeyForProtocol(inbound.Protocol, existing)