mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
datasource as cfg: typo
This commit is contained in:
parent
da6430ac01
commit
d68bfaa8be
@ -139,7 +139,7 @@ func UpdateDataSource(c *middleware.Context, cmd m.UpdateDataSourceCommand) Resp
|
||||
|
||||
err = bus.Dispatch(&cmd)
|
||||
if err != nil {
|
||||
if err == m.ErrDataSouceUpdatingOldVersion {
|
||||
if err == m.ErrDataSourceUpdatingOldVersion {
|
||||
return ApiError(500, "Failed to update datasource. Reload new version and try again", err)
|
||||
} else {
|
||||
return ApiError(500, "Failed to update datasource", err)
|
||||
|
@ -23,11 +23,10 @@ const (
|
||||
DS_ACCESS_PROXY = "proxy"
|
||||
)
|
||||
|
||||
// Typed errors
|
||||
var (
|
||||
ErrDataSourceNotFound = errors.New("Data source not found")
|
||||
ErrDataSourceNameExists = errors.New("Data source with same name already exists")
|
||||
ErrDataSouceUpdatingOldVersion = errors.New("Trying to update old version of datasouce")
|
||||
ErrDataSourceUpdatingOldVersion = errors.New("Trying to update old version of datasource")
|
||||
)
|
||||
|
||||
type DsAccess string
|
||||
|
@ -167,7 +167,7 @@ func UpdateDataSource(cmd *m.UpdateDataSourceCommand) error {
|
||||
}
|
||||
|
||||
if affected == 0 {
|
||||
return m.ErrDataSouceUpdatingOldVersion
|
||||
return m.ErrDataSourceUpdatingOldVersion
|
||||
}
|
||||
|
||||
err = updateIsDefaultFlag(ds, sess)
|
||||
|
Loading…
Reference in New Issue
Block a user