diff options
author | Unknwon <u@gogs.io> | 2018-03-20 19:06:13 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2018-03-20 19:06:13 -0400 |
commit | 52ee796d6da01320150c6e850e19c97ab8b1da10 (patch) | |
tree | 8cbe27ac0315571dca395fb72cb7e7f486ecfd10 /models | |
parent | 0f737f29993e8e986ea91b88aa70213fde4fa89e (diff) |
repo_branch: fix SQL builder (#5054)
Diffstat (limited to 'models')
-rw-r--r-- | models/repo_branch.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo_branch.go b/models/repo_branch.go index ce06c9f3..6439faf0 100644 --- a/models/repo_branch.go +++ b/models/repo_branch.go @@ -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) } |