Fix where syntax (#2676)

This commit is contained in:
qwerty287
2023-10-31 12:43:06 +01:00
committed by GitHub
parent 8a21a4c08e
commit 9c07b15c99

View File

@@ -43,10 +43,7 @@ func (s storage) ServerConfigSet(key, value string) error {
return err
}
// TODO change to Where() when https://gitea.com/xorm/xorm/issues/2358 is solved
_, err = s.engine.Cols("value").Update(config, &model.ServerConfig{
Key: key,
})
_, err = s.engine.Where("`key` = ?", config.Key).Cols("value").Update(config)
return err
}