Commit cedb11eb by Matt Robenolt

Let xorm convert `False` into the right type

parent ffe389af
......@@ -89,8 +89,8 @@ func AddDataSource(cmd *m.AddDataSourceCommand) error {
func updateIsDefaultFlag(ds *m.DataSource, sess *xorm.Session) error {
// Handle is default flag
if ds.IsDefault {
rawSql := "UPDATE data_source SET is_default = 0 WHERE org_id=? AND id <> ?"
if _, err := sess.Exec(rawSql, ds.OrgId, ds.Id); err != nil {
rawSql := "UPDATE data_source SET is_default=? WHERE org_id=? AND id <> ?"
if _, err := sess.Exec(rawSql, False, ds.OrgId, ds.Id); err != nil {
return err
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment