forked from forgejo/forgejo
Make more functions use ctx instead of db.DefaultContext (#24068)
Continue the "ctx refactoring" work. There are still a lot db.DefaultContext, incorrect context could cause database deadlock errors.
This commit is contained in:
parent
b667634b32
commit
cfe3d6e9b5
17 changed files with 79 additions and 79 deletions
|
@ -743,8 +743,8 @@ func ChangeIssueStatus(ctx context.Context, issue *Issue, doer *user_model.User,
|
|||
}
|
||||
|
||||
// ChangeIssueTitle changes the title of this issue, as the given user.
|
||||
func ChangeIssueTitle(issue *Issue, doer *user_model.User, oldTitle string) (err error) {
|
||||
ctx, committer, err := db.TxContext(db.DefaultContext)
|
||||
func ChangeIssueTitle(ctx context.Context, issue *Issue, doer *user_model.User, oldTitle string) (err error) {
|
||||
ctx, committer, err := db.TxContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue