fix: ignore user settings on report doc (#24162)

This commit is contained in:
Ankush Menat 2024-01-08 12:42:13 +05:30 committed by GitHub
parent 482813e46d
commit c1d687ddbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,10 +111,9 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
//Setup groupby for reports
this.group_by_control = new frappe.ui.GroupBy(this);
if (this.report_doc && this.report_doc.json.group_by) {
if (this.report_doc?.json?.group_by) {
this.group_by_control.apply_settings(this.report_doc.json.group_by);
}
if (this.view_user_settings && this.view_user_settings.group_by) {
} else if (this.view_user_settings?.group_by) {
this.group_by_control.apply_settings(this.view_user_settings.group_by);
}
}