fix: validate DocType selection before setting filters for Link

This commit is contained in:
Abdeali Chharchhoda 2025-11-05 19:08:20 +05:30
parent 66b3fb52b0
commit 3dc66b47cf

View file

@ -154,7 +154,15 @@ function add_existing_filter(frm, df) {
}
function edit_filters() {
let field_doctype = props.field.df.options;
const field_doctype = props.field.df.options;
if (!field_doctype) {
frappe.throw({
message: __("Please select a DocType in options before setting filters"),
title: __("DocType Missing"),
});
}
const { frm } = store;
make_dialog(frm);