Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][FIX] base_tier_validation: last comment instead of first comment #976

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions base_tier_validation/models/tier_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def _notify_accepted_reviews_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 accepted. (%s)") % comment
return _("A review was accepted")

Expand Down 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
Loading