aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorsillyguodong <33891828+sillyguodong@users.noreply.github.com>2023-04-20 07:50:00 +0800
committerGitHub <noreply@github.com>2023-04-19 19:50:00 -0400
commitbfecf3bd89e00f8ecae782087182e1952076c9af (patch)
tree74e4e1084f4eb2ad7d798ea61ed0cba9119178fe /contrib
parentda6e9f63df7411ecbe630178fd4bb694e537c453 (diff)
downloadgitea-bfecf3bd89e00f8ecae782087182e1952076c9af.tar.gz
gitea-bfecf3bd89e00f8ecae782087182e1952076c9af.zip
Fix internal sever error when visiting a PR that bound to the deleted team (#24127)
Close: #23738 The actual cause of `500 Internal Server Error` in the issue is not what is descirbed in the issue. The actual cause is that after deleting team, if there is a PR which has requested reivew from the deleted team, the comment could not match with the deleted team by `assgin_team_id`. So the value of `.AssigneeTeam` (see below code block) is `nil` which cause `500 error`. https://github.com/go-gitea/gitea/blob/1c8bc4081a4f4d0d921ac218cb724ce97924d410/templates/repo/issue/view_content/comments.tmpl#L691-L695 To fix this bug, there are the following problems to be resolved: - [x] 1. ~~Stroe the name of the team in `content` column when inserting `comment` into DB in case that we cannot get the name of team after it is deleted. But for comments that already exist, just display "Unknown Team"~~ Just display "Ghost Team" in the comment if the assgined team is deleted. - [x] 2. Delete the PR&team binding (the row of which `review_team_id = ${team_id} ` in table `review`) when deleting team. - [x] 3.For already exist and undeleted binding rows in in table `review`, ~~we can delete these rows when executing migrations.~~ they do not affect the function, so won't delete them.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions