Merge pull request #29984 from dj12djdjs/fix-rename-tool-msg

fix: rename tool show fail message
This commit is contained in:
Saqib Ansari 2022-03-16 10:57:17 +05:30 committed by GitHub
commit e9e2679dff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,16 @@ frappe.ui.form.on("Rename Tool", {
select_doctype: frm.doc.select_doctype
},
callback: function(r) {
frm.get_field("rename_log").$wrapper.html(r.message.join("<br>"));
let html = r.message.join("<br>");
if (r.exc) {
r.exc = frappe.utils.parse_json(r.exc);
if (Array.isArray(r.exc)) {
html += "<br>" + r.exc.join("<br>");
}
}
frm.get_field("rename_log").$wrapper.html(html);
}
});
});