Browse Source

fix(notifications): handle none configured image uploader

ref #6152
bergquist 9 years ago
parent
commit
1a062c52fa
1 changed files with 4 additions and 1 deletions
  1. 4 1
      pkg/services/alerting/notifier.go

+ 4 - 1
pkg/services/alerting/notifier.go

@@ -62,7 +62,10 @@ func (n *RootNotifier) sendNotifications(notifiers []Notifier, context *EvalCont
 }
 
 func (n *RootNotifier) uploadImage(context *EvalContext) (err error) {
-	uploader, _ := imguploader.NewImageUploader()
+	uploader, err := imguploader.NewImageUploader()
+	if err != nil {
+		return err
+	}
 
 	renderOpts := &renderer.RenderOpts{
 		Width:   "800",