Skip to content

Commit 823d67f

Browse files
committed
pass context down
1 parent 84d9dee commit 823d67f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

models/issues/issue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,8 @@ func insertIssue(ctx context.Context, issue *Issue) error {
939939
}
940940

941941
// ChangeIssueTimeEstimate changes the plan time of this issue, as the given user.
942-
func ChangeIssueTimeEstimate(issue *Issue, doer *user_model.User, timeEstimate int64) (err error) {
943-
ctx, committer, err := db.TxContext(db.DefaultContext)
942+
func ChangeIssueTimeEstimate(ctx context.Context, issue *Issue, doer *user_model.User, timeEstimate int64) (err error) {
943+
ctx, committer, err := db.TxContext(ctx)
944944
if err != nil {
945945
return err
946946
}

routers/web/repo/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,7 @@ func UpdateIssueTimeEstimate(ctx *context.Context) {
22622262
return
22632263
}
22642264

2265-
if err := issue_service.ChangeTimeEstimate(issue, ctx.Doer, total); err != nil {
2265+
if err := issue_service.ChangeTimeEstimate(ctx, issue, ctx.Doer, total); err != nil {
22662266
ctx.ServerError("ChangeTimeEstimate", err)
22672267
return
22682268
}

services/issue/issue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ func ChangeTitle(ctx context.Context, issue *issues_model.Issue, doer *user_mode
106106
}
107107

108108
// ChangeTimeEstimate changes the time estimate of this issue, as the given user.
109-
func ChangeTimeEstimate(issue *issues_model.Issue, doer *user_model.User, timeEstimate int64) (err error) {
109+
func ChangeTimeEstimate(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, timeEstimate int64) (err error) {
110110
issue.TimeEstimate = timeEstimate
111111

112-
return issues_model.ChangeIssueTimeEstimate(issue, doer, timeEstimate)
112+
return issues_model.ChangeIssueTimeEstimate(ctx, issue, doer, timeEstimate)
113113
}
114114

115115
// ChangeIssueRef changes the branch of this issue, as the given user.

0 commit comments

Comments
 (0)