Skip to content

BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr

fix: allow nil return for non-existent configuration in multi_ip_domain

lotked78d9494981
diff --git a/core/internal/service/multi_ip_domain/multi_ip_domain.go b/core/internal/service/multi_ip_domain/multi_ip_domain.go
index 61c29f35..fee13f85 100644
--- a/core/internal/service/multi_ip_domain/multi_ip_domain.go
+++ b/core/internal/service/multi_ip_domain/multi_ip_domain.go
@@ -149,7 +149,8 @@ func (s *MultiIPDomainService) DeleteConfig(ctx context.Context, domain string)
}
if len(config) == 0 {
- return gerror.New("configuration does not exist")
+ //return gerror.New("configuration does not exist")
+ return nil
}
_, err = tx.Model("bm_multi_ip_domain").Where("domain", domain).Delete()