Merge pull request #6529 from rohitwaghchaure/dashboard_links_are_not_working

[Fix] Dashboard links are not working
This commit is contained in:
Faris Ansari 2018-11-26 09:16:04 +01:00 committed by GitHub
commit 7bdfb1d67f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,8 @@ frappe.views.BaseList = class BaseList {
frappe.run_serially([
() => this.init(),
() => this.before_refresh(),
() => this.refresh()
() => this.refresh(),
() => frappe.route_options = null
]);
}

View file

@ -268,7 +268,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
if (frappe.route_options) {
// Priority 1: route filters
this.filters = this.parse_filters_from_route_options();
} else if (this.view_user_settings.filters) {
} else if (this.view_user_settings.filters && this.view_user_settings.filters.length) {
// Priority 2: saved filters
const saved_filters = this.view_user_settings.filters;
this.filters = this.validate_filters(saved_filters);
@ -1161,7 +1161,6 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
}
}
}
frappe.route_options = null;
return filters;
}