diff options
author | Wendell Sun | 2018-02-24 06:07:25 +0800 |
---|---|---|
committer | Lauris BH | 2018-02-24 00:07:25 +0200 |
commit | dd784396ce6fc6a000949c4193f105c2f0540f67 (patch) | |
tree | 2d26ffea964d3213e1af7ad05de6b008554179c9 | |
parent | 4a0ce6896b4ed938626361a81aab163213df2cec (diff) |
Fix query protected branch bug (#3563) (#3571)
Signed-off-by: Wendell Sun <iwendellsun@gmail.com>
-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 bf5d4fdb4..0a3d19858 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 |