Browse Source

repo_branch: fix SQL builder (#5054)

pull/5126/head
Unknwon 7 years ago
parent
commit
52ee796d6d
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      gogs.go
  2. 2
      models/repo_branch.go
  3. 2
      templates/.VERSION

2
gogs.go

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

2
models/repo_branch.go

@ -253,5 +253,5 @@ func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whit
// GetProtectBranchesByRepoID returns a list of *ProtectBranch in given repostiory. // GetProtectBranchesByRepoID returns a list of *ProtectBranch in given repostiory.
func GetProtectBranchesByRepoID(repoID int64) ([]*ProtectBranch, error) { func GetProtectBranchesByRepoID(repoID int64) ([]*ProtectBranch, error) {
protectBranches := make([]*ProtectBranch, 0, 2) 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)
} }

2
templates/.VERSION

@ -1 +1 @@
0.11.38.0312 0.11.39.0320
Loading…
Cancel
Save