From 52ee796d6da01320150c6e850e19c97ab8b1da10 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 20 Mar 2018 19:06:13 -0400 Subject: [PATCH] repo_branch: fix SQL builder (#5054) --- gogs.go | 2 +- models/repo_branch.go | 2 +- templates/.VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gogs.go b/gogs.go index 0086ca228..101dc9018 100644 --- a/gogs.go +++ b/gogs.go @@ -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 ce06c9f35..6439faf04 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 9cfaf73dd..04072a6c3 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