feat: safely parse exception
This commit is contained in:
parent
a1ae7fcbc8
commit
597bb2c7e8
@ -33,8 +33,10 @@ frappe.ui.form.on("Rename Tool", {
|
|||||||
let html = r.message.join("<br>");
|
let html = r.message.join("<br>");
|
||||||
|
|
||||||
if (r.exc) {
|
if (r.exc) {
|
||||||
r.exc = JSON.parse(r.exc);
|
r.exc = frappe.utils.parse_json(r.exc);
|
||||||
html += "<br>" + r.exc.join("<br>");
|
if (Array.isArray(r.exc)) {
|
||||||
|
html += "<br>" + r.exc.join("<br>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frm.get_field("rename_log").$wrapper.html(html);
|
frm.get_field("rename_log").$wrapper.html(html);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user