Skip to content

Commit

Permalink
fix: add missing error check in deleting group
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2E committed Mar 13, 2024
1 parent 428210e commit c66559a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (g Group) Delete(req *ReqGroupDelete) error {
return errors.New("cannot delete the default group")
}
// FIX: transaction
if err := g.feedRepo.UpdateGroupID(req.ID, 1); err != nil {
if err := g.feedRepo.UpdateGroupID(req.ID, 1); err != nil && !errors.Is(err, repo.ErrNotFound) {
return err
}
return g.groupRepo.Delete(req.ID)
Expand Down

0 comments on commit c66559a

Please sign in to comment.