mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Let xorm convert False
into the right type
This commit is contained in:
parent
ffe389af4a
commit
cedb11ebab
@ -89,8 +89,8 @@ func AddDataSource(cmd *m.AddDataSourceCommand) error {
|
|||||||
func updateIsDefaultFlag(ds *m.DataSource, sess *xorm.Session) error {
|
func updateIsDefaultFlag(ds *m.DataSource, sess *xorm.Session) error {
|
||||||
// Handle is default flag
|
// Handle is default flag
|
||||||
if ds.IsDefault {
|
if ds.IsDefault {
|
||||||
rawSql := "UPDATE data_source SET is_default = 0 WHERE org_id=? AND id <> ?"
|
rawSql := "UPDATE data_source SET is_default=? WHERE org_id=? AND id <> ?"
|
||||||
if _, err := sess.Exec(rawSql, ds.OrgId, ds.Id); err != nil {
|
if _, err := sess.Exec(rawSql, False, ds.OrgId, ds.Id); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user