fix: check that row link_type is DocType before call with_doctype

This commit is contained in:
KerollesFathy 2026-01-10 14:15:40 +00:00
parent af65ae4a51
commit 6d8b960a5f

View file

@ -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");