Преглед изворни кода

alerting: fixes invalid error handling

bergquist пре 7 година
родитељ
комит
86e65f84f9
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      pkg/services/sqlstore/alert_notification.go

+ 2 - 2
pkg/services/sqlstore/alert_notification.go

@@ -204,8 +204,8 @@ func UpdateAlertNotification(cmd *m.UpdateAlertNotificationCommand) error {
 			return m.ErrNotificationFrequencyNotFound
 		}
 
-		frequency, err_convert := time.ParseDuration(cmd.Frequency)
-		if err_convert != nil {
+		frequency, err := time.ParseDuration(cmd.Frequency)
+		if err != nil {
 			return err
 		}
 		current.Frequency = frequency