diff --git a/frappe/core/page/dashboard/dashboard.js b/frappe/core/page/dashboard/dashboard.js
index ea49cf2999..7ac3eec066 100644
--- a/frappe/core/page/dashboard/dashboard.js
+++ b/frappe/core/page/dashboard/dashboard.js
@@ -125,7 +125,10 @@ class DashboardChart {
}
}
];
+ this.set_chart_actions(actions);
+ }
+ set_chart_actions(actions) {
this.chart_actions = $(`
@@ -149,7 +152,7 @@ class DashboardChart {
{
chart_name: this.chart_doc.name,
filters: filters,
- refresh: refresh,
+ refresh: refresh ? 1 : 0,
}
);
}
diff --git a/frappe/core/page/dashboard/dashboard.py b/frappe/core/page/dashboard/dashboard.py
index ce4bf4742c..b1f45e0737 100644
--- a/frappe/core/page/dashboard/dashboard.py
+++ b/frappe/core/page/dashboard/dashboard.py
@@ -16,7 +16,7 @@ def cache_source(function):
"name": chart_name,
"filters": filters
}, default=str)
- if kwargs.get("refresh") == "true":
+ if kwargs.get("refresh"):
results = generate_and_cache_results(chart_name, function, filters, cache_key)
else:
cached_results = frappe.cache().get_value(cache_key)