diff options
Diffstat (limited to 'routers/repo/setting_protected_branch.go')
-rw-r--r-- | routers/repo/setting_protected_branch.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/setting_protected_branch.go b/routers/repo/setting_protected_branch.go index 05ad0ec0ec..b5a115b6a4 100644 --- a/routers/repo/setting_protected_branch.go +++ b/routers/repo/setting_protected_branch.go @@ -103,7 +103,7 @@ func SettingsProtectedBranch(c *context.Context) { protectBranch, err := models.GetProtectedBranchBy(c.Repo.Repository.ID, branch) if err != nil { - if !models.IsErrBranchNotExist(err) { + if !git.IsErrBranchNotExist(err) { c.ServerError("GetProtectBranchOfRepoByName", err) return } @@ -152,7 +152,7 @@ func SettingsProtectedBranchPost(ctx *context.Context, f auth.ProtectBranchForm) protectBranch, err := models.GetProtectedBranchBy(ctx.Repo.Repository.ID, branch) if err != nil { - if !models.IsErrBranchNotExist(err) { + if !git.IsErrBranchNotExist(err) { ctx.ServerError("GetProtectBranchOfRepoByName", err) return } |