repo_branch: fix SQL builder (#5054)

pull/5126/head
Unknwon 2018-03-20 19:06:13 -04:00
parent 0f737f2999
commit 52ee796d6d
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
3 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ import (
"github.com/gogits/gogs/pkg/setting"
)
const APP_VER = "0.11.38.0312"
const APP_VER = "0.11.39.0320"
func init() {
setting.AppVer = APP_VER

View File

@ -253,5 +253,5 @@ func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whit
// GetProtectBranchesByRepoID returns a list of *ProtectBranch in given repostiory.
func GetProtectBranchesByRepoID(repoID int64) ([]*ProtectBranch, error) {
protectBranches := make([]*ProtectBranch, 0, 2)
return protectBranches, x.Where("repo_id = ? and protected=true", repoID).Asc("name").Find(&protectBranches)
return protectBranches, x.Where("repo_id = ? and protected = ?", repoID, true).Asc("name").Find(&protectBranches)
}

View File

@ -1 +1 @@
0.11.38.0312
0.11.39.0320