fix(msgprint): let as_table work properly
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
4f0e303f18
commit
a7cfb11e4b
1 changed files with 5 additions and 3 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue