Procházet zdrojové kódy

Merge pull request #6512 from utkarshcmu/pagerduty_bug

Send test notification fixed
Carl Bergquist před 9 roky
rodič
revize
0d729ae392
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      pkg/services/alerting/notifiers/pagerduty.go

+ 1 - 1
pkg/services/alerting/notifiers/pagerduty.go

@@ -55,7 +55,7 @@ func (this *PagerdutyNotifier) Notify(evalContext *alerting.EvalContext) error {
 		bodyJSON.Set("client_url", ruleUrl)
 		bodyJSON.Set("client_url", ruleUrl)
 
 
 		if evalContext.ImagePublicUrl != "" {
 		if evalContext.ImagePublicUrl != "" {
-			var contexts []interface{}
+			contexts := make([]interface{}, 1)
 			imageJSON := simplejson.New()
 			imageJSON := simplejson.New()
 			imageJSON.Set("type", "image")
 			imageJSON.Set("type", "image")
 			imageJSON.Set("src", evalContext.ImagePublicUrl)
 			imageJSON.Set("src", evalContext.ImagePublicUrl)