diff --git a/pkg/notify/models/notification.go b/pkg/notify/models/notification.go index 5a27b65c56..8e3b8d74dc 100644 --- a/pkg/notify/models/notification.go +++ b/pkg/notify/models/notification.go @@ -87,6 +87,9 @@ func (nm *SNotificationManager) ValidateCreateData(ctx context.Context, userCred if !userCred.IsAllow(rbacutils.ScopeSystem, api.SERVICE_TYPE, nm.KeywordPlural(), policy.PolicyActionPerform, SendByContact) { return input, httperrors.NewForbiddenError("can't send notification by contact, need receiver") } + if len(input.Contacts) == 0 { + input.Contacts = []string{""} + } } // check contact type enabled