Browse Source

alerting: fixes invalid error handling

bergquist 7 năm trước cách đây
mục cha
commit
86e65f84f9
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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