Sfoglia il codice sorgente

fix(rule): fixes rule reading bug

bergquist 9 anni fa
parent
commit
887e236bce
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      pkg/services/alerting/conditions/query.go

+ 2 - 1
pkg/services/alerting/conditions/query.go

@@ -184,5 +184,6 @@ func validateToValue(to string) error {
 		}
 		}
 	}
 	}
 
 
-	return fmt.Errorf("cannot parse to value %s", to)
+	_, err := time.ParseDuration(to)
+	return err
 }
 }