Merge pull request #7273 from deepeshgarg007/query_report_hotfix

fix: Refresh query report if route options are passed
This commit is contained in:
Deepesh Garg 2019-04-15 11:26:00 +05:30 committed by GitHub
commit 820fb104fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,10 +93,16 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
this.toggle_nothing_to_show(true);
return;
}
if (this.report_name !== frappe.get_route()[1]) {
// this.toggle_loading(true);
// different report
this.load_report();
}
else if (frappe.route_options){
// filters passed through routes
// so refresh report again
this.refresh_report();
} else {
// same report
// don't do anything to preserve state