fix: TypeError when using frappe.throw() or frappe.msgprint() with lists (#19255)

Co-authored-by: Alfredo Altamirano <Ahuahuachi@users.noreply.github.com>

[skip ci]
This commit is contained in:
Alfredo Altamirano 2022-12-13 00:29:58 -06:00 committed by GitHub
parent 536ddc7832
commit ffe3ba140e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -453,7 +453,10 @@ def msgprint(
out.as_list = 1
if sys.stdin and sys.stdin.isatty():
msg = _strip_html_tags(out.message)
if out.as_list:
msg = [_strip_html_tags(msg) for msg in out.message]
else:
msg = _strip_html_tags(out.message)
if flags.print_messages and out.message:
print(f"Message: {_strip_html_tags(out.message)}")