fix(quick_list): Ensure fields exist before fetching
This commit is contained in:
parent
e964c11cd6
commit
ecf2976681
1 changed files with 7 additions and 2 deletions
|
|
@ -205,8 +205,13 @@ export default class QuickListWidget extends Widget {
|
|||
|
||||
let add_fields = frappe.listview_settings?.[this.document_type]?.add_fields;
|
||||
if (Array.isArray(add_fields)) {
|
||||
fields.push(...add_fields);
|
||||
fields = [...new Set(fields)];
|
||||
for (const fieldname of add_fields) {
|
||||
// Only keep fields that exist and are permitted
|
||||
if (frappe.meta.has_field(this.document_type, fieldname)) {
|
||||
fields.push(fieldname);
|
||||
}
|
||||
}
|
||||
fields = [...new Set(fields)]; // Remove duplicates
|
||||
}
|
||||
|
||||
let quick_list_filter = frappe.utils.process_filter_expression(this.quick_list_filter);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue