Browse Source

repo_branch: fix SQL builder (#5054)

Unknwon 7 years ago
parent
commit
52ee796d6d
3 changed files with 3 additions and 3 deletions
  1. 1 1
      gogs.go
  2. 1 1
      models/repo_branch.go
  3. 1 1
      templates/.VERSION

+ 1 - 1
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

+ 1 - 1
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)
 }

+ 1 - 1
templates/.VERSION

@@ -1 +1 @@
-0.11.38.0312
+0.11.39.0320