[FIX] base_exception_user: fix stack trace when exception description is False

H7674
This commit is contained in:
Cedric Collins
2021-09-24 11:11:25 -05:00
parent 1a48375b51
commit 84f4a3ee2b
2 changed files with 21 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ class ExceptionRuleConfirm(models.AbstractModel):
def action_confirm(self):
if self.ignore and 'message_ids' in self.related_model_id:
exceptions_summary = '<ul>%s</ul>' % ''.join(
['<li>%s: <i>%s</i></li>' % tuple(map(html.escape, (e.name, e.description))) for e in
['<li>%s: <i>%s</i></li>' % tuple(map(html.escape, (e.name, e.description or ''))) for e in
self.exception_ids])
msg = '<p><strong>Exceptions ignored:</strong></p>' + exceptions_summary
self.related_model_id.message_post(body=msg)