Fix query protected branch bug (#3563) (#3571)

Signed-off-by: Wendell Sun <iwendellsun@gmail.com>
This commit is contained in:
Wendell Sun 2018-02-24 06:07:25 +08:00 committed by Lauris BH
parent 4a0ce6896b
commit dd784396ce
1 changed files with 1 additions and 2 deletions

View File

@ -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