From 36eb3c433ae384f21beec63eb648141fb9dba676 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 10 Aug 2023 10:39:21 +0800 Subject: Add transaction when creating pull request created dirty data (#26259) Fix #26129 Replace #26258 This PR will introduce a transaction on creating pull request so that if some step failed, it will rollback totally. And there will be no dirty pull request exist. --------- Co-authored-by: Giteabot --- routers/web/repo/issue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/web/repo') diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 7bddabd10a..488c97b0eb 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -2290,7 +2290,7 @@ func UpdateIssueAssignee(ctx *context.Context) { return } - _, _, err = issue_service.ToggleAssignee(ctx, issue, ctx.Doer, assigneeID) + _, _, err = issue_service.ToggleAssigneeWithNotify(ctx, issue, ctx.Doer, assigneeID) if err != nil { ctx.ServerError("ToggleAssignee", err) return -- cgit v1.2.3