LibraryElements: replaces is_folder=1 usages with correct dialect string (#34453)

This commit is contained in:
Hugo Häggmark 2021-05-20 07:22:34 +02:00 committed by GitHub
parent 40139a7ea9
commit 21d6f02dd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -660,7 +660,7 @@ func (l *LibraryElementService) deleteLibraryElementsInFolderUID(c *models.ReqCo
var folderUIDs []struct {
ID int64 `xorm:"id"`
}
err := session.SQL("SELECT id from dashboard WHERE uid=? AND org_id=? AND is_folder=1", folderUID, c.SignedInUser.OrgId).Find(&folderUIDs)
err := session.SQL("SELECT id from dashboard WHERE uid=? AND org_id=? AND is_folder=?", folderUID, c.SignedInUser.OrgId, l.SQLStore.Dialect.BooleanStr(true)).Find(&folderUIDs)
if err != nil {
return err
}