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 | |
parent | 0f737f29993e8e986ea91b88aa70213fde4fa89e (diff) |
repo_branch: fix SQL builder (#5054)
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | models/repo_branch.go | 2 | ||||
-rw-r--r-- | templates/.VERSION | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -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 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) } diff --git a/templates/.VERSION b/templates/.VERSION index 9cfaf73d..04072a6c 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.11.38.0312
\ No newline at end of file +0.11.39.0320
\ No newline at end of file |