style: Linting fixes

This commit is contained in:
Aditya Hase 2019-03-18 11:35:07 +05:30
parent 3567326ae9
commit e31368a9f7
2 changed files with 5 additions and 2 deletions

View file

@ -125,7 +125,10 @@ class DashboardChart {
}
}
];
this.set_chart_actions(actions);
}
set_chart_actions(actions) {
this.chart_actions = $(`<div class="chart-actions btn-group dropdown pull-right">
<a class="dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false"> <button class="btn btn-default btn-xs"><span class="caret"></span></button>
@ -149,7 +152,7 @@ class DashboardChart {
{
chart_name: this.chart_doc.name,
filters: filters,
refresh: refresh,
refresh: refresh ? 1 : 0,
}
);
}

View file

@ -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)