From a7cfb11e4b09eb5cf2b64be534ad4949002a48e1 Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Tue, 23 Dec 2025 17:30:03 +0530 Subject: [PATCH] fix(msgprint): let `as_table` work properly Signed-off-by: Akhil Narang --- frappe/utils/messages.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frappe/utils/messages.py b/frappe/utils/messages.py index a38625d101..c79c996aa6 100644 --- a/frappe/utils/messages.py +++ b/frappe/utils/messages.py @@ -69,12 +69,14 @@ def msgprint( if sys.stdin and sys.stdin.isatty(): if out.as_list: - msg = [_strip_html_tags(msg) for msg in out.message] + out.message = [_strip_html_tags(cell) for cell in msg] + elif out.as_table: + out.message = [[_strip_html_tags(cell) for cell in row] for row in msg] else: - msg = _strip_html_tags(out.message) + out.message = _strip_html_tags(msg) if frappe.flags.print_messages and out.message: - print(f"Message: {_strip_html_tags(out.message)}") + print(f"Message: {out.message}") out.title = title or _("Message", context="Default title of the message dialog")