diff options
author | JakobDev <jakobdev@gmx.de> | 2023-09-29 14:12:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-29 12:12:54 +0000 |
commit | cf0df023be06c8acec4fc8fb05eab1d1c2e52fd1 (patch) | |
tree | 4fd233354202942b597f3591a22e5ea14fe7d0eb /routers/web/repo/pull.go | |
parent | 3945c26722dececf2433107c47821238dae7e3c2 (diff) | |
download | gitea-cf0df023be06c8acec4fc8fb05eab1d1c2e52fd1.tar.gz gitea-cf0df023be06c8acec4fc8fb05eab1d1c2e52fd1.zip |
More `db.DefaultContext` refactor (#27265)
Part of #27065
This PR touches functions used in templates. As templates are not static
typed, errors are harder to find, but I hope I catch it all. I think
some tests from other persons do not hurt.
Diffstat (limited to 'routers/web/repo/pull.go')
-rw-r--r-- | routers/web/repo/pull.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 6e69811901..0c7b91dab8 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -959,7 +959,7 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi } if ctx.IsSigned && ctx.Doer != nil { - if ctx.Data["CanMarkConversation"], err = issues_model.CanMarkConversation(issue, ctx.Doer); err != nil { + if ctx.Data["CanMarkConversation"], err = issues_model.CanMarkConversation(ctx, issue, ctx.Doer); err != nil { ctx.ServerError("CanMarkConversation", err) return } @@ -986,7 +986,7 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi } numPendingCodeComments := int64(0) if currentReview != nil { - numPendingCodeComments, err = issues_model.CountComments(&issues_model.FindCommentsOptions{ + numPendingCodeComments, err = issues_model.CountComments(ctx, &issues_model.FindCommentsOptions{ Type: issues_model.CommentTypeCode, ReviewID: currentReview.ID, IssueID: issue.ID, |