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:
Marcus Efraimsson
2017-12-20 12:15:49 +01:00
committed by Daniel Lee
parent 4acf6b0eee
commit df3655dd4a
3 changed files with 12 additions and 6 deletions
+6 -1
View File
@@ -170,7 +170,12 @@ func GetDashboardAclInfoList(query *m.GetDashboardAclInfoListQuery) error {
FROM dashboard_acl as da,
dashboard as dash
LEFT JOIN dashboard folder on dash.folder_id = folder.id
WHERE dash.id = ? AND (dash.has_acl = 0 or folder.has_acl = 0) AND da.dashboard_id = -1
WHERE
dash.id = ? AND (
dash.has_acl = ` + dialect.BooleanStr(false) + ` or
folder.has_acl = ` + dialect.BooleanStr(false) + `
) AND
da.dashboard_id = -1
`
query.Result = make([]*m.DashboardAclInfoDTO, 0)