Skip to content

Commit

Permalink
fix: notify pluggins can have no backends (fixes regression introduce…
Browse files Browse the repository at this point in the history
…d by #51) (#83)

NotifyBackends can be empty ( as https://github.com/ovh/utask/blob/master/pkg/notify/notify.go#L51 )

Signed-off-by: Romain Beuque <romain.beuque@corp.ovh.com>
  • Loading branch information
rbeuque74 committed Mar 3, 2020
1 parent 0692d57 commit 47b8cdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/plugins/builtin/notify/notify.go
@@ -1,7 +1,6 @@
package notify

import (
"errors"
"fmt"
"sort"
"strings"
Expand Down Expand Up @@ -35,7 +34,8 @@ func validConfig(config interface{}) error {
cfg := config.(*Config)

if len(cfg.Backends) == 0 {
return errors.New("backends field can't be empty")
// if no backends defined, implies that all backends will be contacted
return nil
}

snames := notify.ListSendersNames()
Expand Down

0 comments on commit 47b8cdf

Please sign in to comment.