db: fix postgres regression when comparing boolean columns/values (#10303)
Use the dialect specific BooleanStr when comparing boolean columns/values. Fixes #10300
This commit is contained in:
committed by
Daniel Lee
parent
4acf6b0eee
commit
df3655dd4a
@@ -345,8 +345,9 @@ func GetDashboards(query *m.GetDashboardsQuery) error {
|
||||
|
||||
func GetDashboardsByPluginId(query *m.GetDashboardsByPluginIdQuery) error {
|
||||
var dashboards = make([]*m.Dashboard, 0)
|
||||
whereExpr := "org_id=? AND plugin_id=? AND is_folder=" + dialect.BooleanStr(false)
|
||||
|
||||
err := x.Where("org_id=? AND plugin_id=? AND is_folder=0", query.OrgId, query.PluginId).Find(&dashboards)
|
||||
err := x.Where(whereExpr, query.OrgId, query.PluginId).Find(&dashboards)
|
||||
query.Result = dashboards
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user