mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	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:
		@@ -534,7 +534,7 @@ func EditPullRequest(ctx *context.APIContext) {
 | 
			
		||||
	// Send an empty array ([]) to clear all assignees from the Issue.
 | 
			
		||||
 | 
			
		||||
	if ctx.Repo.CanWrite(unit.TypePullRequests) && (form.Assignees != nil || len(form.Assignee) > 0) {
 | 
			
		||||
		err = issue_service.UpdateAssignees(issue, form.Assignee, form.Assignees, ctx.Doer)
 | 
			
		||||
		err = issue_service.UpdateAssignees(ctx, issue, form.Assignee, form.Assignees, ctx.Doer)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			if user_model.IsErrUserNotExist(err) {
 | 
			
		||||
				ctx.Error(http.StatusUnprocessableEntity, "", fmt.Sprintf("Assignee does not exist: [name: %s]", err))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user