diff --git a/models/org_team.go b/models/org_team.go index be3b63b52e..4c973b4d1b 100644 --- a/models/org_team.go +++ b/models/org_team.go @@ -414,6 +414,7 @@ func DeleteTeam(t *organization.Team) error { &organization.TeamUser{OrgID: t.OrgID, TeamID: t.ID}, &organization.TeamUnit{TeamID: t.ID}, &organization.TeamInvite{TeamID: t.ID}, + &issues_model.Review{Type: issues_model.ReviewTypeRequest, ReviewerTeamID: t.ID}, // batch delete the binding relationship between team and PR (request review from team) ); err != nil { return err } diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 251f205a03..39a6722e84 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -688,10 +688,15 @@ {{$.locale.Tr "repo.issues.review.add_review_request" (.Assignee.GetDisplayName|Escape) $createdStr | Safe}} {{end}} {{else}} + + {{$teamName := "Ghost Team"}} + {{if .AssigneeTeam}} + {{$teamName = .AssigneeTeam.Name}} + {{end}} {{if .RemovedAssignee}} - {{$.locale.Tr "repo.issues.review.remove_review_request" (.AssigneeTeam.Name|Escape) $createdStr | Safe}} + {{$.locale.Tr "repo.issues.review.remove_review_request" ($teamName|Escape) $createdStr | Safe}} {{else}} - {{$.locale.Tr "repo.issues.review.add_review_request" (.AssigneeTeam.Name|Escape) $createdStr | Safe}} + {{$.locale.Tr "repo.issues.review.add_review_request" ($teamName|Escape) $createdStr | Safe}} {{end}} {{end}}