diff options
Diffstat (limited to 'services/repository/files/patch.go')
-rw-r--r-- | services/repository/files/patch.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/repository/files/patch.go b/services/repository/files/patch.go index 73464f31f3..d55d793f28 100644 --- a/services/repository/files/patch.go +++ b/services/repository/files/patch.go @@ -10,6 +10,7 @@ import ( "strings" "code.gitea.io/gitea/models" + git_model "code.gitea.io/gitea/models/git" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" @@ -66,7 +67,7 @@ func (opts *ApplyDiffPatchOptions) Validate(ctx context.Context, repo *repo_mode return err } } else { - protectedBranch, err := models.GetProtectedBranchBy(ctx, repo.ID, opts.OldBranch) + protectedBranch, err := git_model.GetProtectedBranchBy(ctx, repo.ID, opts.OldBranch) if err != nil { return err } |