Skip to content

Commit

Permalink
[FIX] base_tier_validation: last comment instead of first comment
Browse files Browse the repository at this point in the history
- With multiple approbation, the first comment is repeated into
mail.message and propagate wrong message
  • Loading branch information
mathben committed Dec 2, 2024
1 parent 0eab298 commit 9c1148b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base_tier_validation/models/tier_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def _notify_rejected_review_body(self):
lambda r: (self.env.user in r.reviewer_ids) and r.comment
)
if has_comment:
comment = has_comment.mapped("comment")[0]
comment = has_comment.mapped("comment")[-1]
return _("A review was rejected by %(user)s. (%(comment)s)") % {
"user": self.env.user.name,
"comment": comment,
Expand Down

0 comments on commit 9c1148b

Please sign in to comment.