fix: check that row link_type is DocType before call with_doctype
This commit is contained in:
parent
af65ae4a51
commit
6d8b960a5f
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ frappe.ui.form.on("Workspace Sidebar Item", {
|
|||
let grid = frm.fields_dict.items.grid;
|
||||
let link_to = row.link_to;
|
||||
let row_obj = grid.get_grid_row(cdn);
|
||||
if (link_to) {
|
||||
if (link_to && row.link_type === "DocType" && row_obj) {
|
||||
frappe.model.with_doctype(link_to, function () {
|
||||
let meta = frappe.get_meta(link_to);
|
||||
let field_obj = row_obj.get_field("navigate_to_tab");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue