diff options
author | Wendell Sun <iwendellsun@gmail.com> | 2018-02-23 10:14:15 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-02-22 20:14:15 -0600 |
commit | 19bf4ddf800dd405bddbafee7574ff4df07ed275 (patch) | |
tree | 2a1454ff20a3506d963164f1a7820797ae651f91 /models/branches.go | |
parent | 845ba9d1537eb1012bb0d448265b5346ef14d2d3 (diff) | |
download | gitea-19bf4ddf800dd405bddbafee7574ff4df07ed275.tar.gz gitea-19bf4ddf800dd405bddbafee7574ff4df07ed275.zip |
Fix query protected branch bug (#3563)
Signed-off-by: Wendell Sun <iwendellsun@gmail.com>
Diffstat (limited to 'models/branches.go')
-rw-r--r-- | models/branches.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/models/branches.go b/models/branches.go index 7cc0ebab4d..d1921d5500 100644 --- a/models/branches.go +++ b/models/branches.go @@ -6,7 +6,6 @@ package models import ( "fmt" - "strings" "time" "code.gitea.io/gitea/modules/base" @@ -70,7 +69,7 @@ func GetProtectedBranchByRepoID(RepoID int64) ([]*ProtectedBranch, error) { // GetProtectedBranchBy getting protected branch by ID/Name func GetProtectedBranchBy(repoID int64, BranchName string) (*ProtectedBranch, error) { - rel := &ProtectedBranch{RepoID: repoID, BranchName: strings.ToLower(BranchName)} + rel := &ProtectedBranch{RepoID: repoID, BranchName: BranchName} has, err := x.Get(rel) if err != nil { return nil, err |