mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 08:00:52 +00:00
fix: aggregate deleted team as ghost team (#7987)
- If a review was requested from a deleted team, use the ghost team for the comment aggregator. - Resolves Codeberg/Community#1952 - Unit test added. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7987 Reviewed-by: Beowulf <beowulf@beocode.eu> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
parent
99d697263f
commit
d6ab2a464f
3 changed files with 42 additions and 2 deletions
|
@ -652,8 +652,11 @@ func (c *Comment) LoadAssigneeUserAndTeam(ctx context.Context) error {
|
|||
|
||||
if c.Issue.Repo.Owner.IsOrganization() {
|
||||
c.AssigneeTeam, err = organization.GetTeamByID(ctx, c.AssigneeTeamID)
|
||||
if err != nil && !organization.IsErrTeamNotExist(err) {
|
||||
return err
|
||||
if err != nil {
|
||||
if !organization.IsErrTeamNotExist(err) {
|
||||
return err
|
||||
}
|
||||
c.AssigneeTeam = organization.NewGhostTeam()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue