fix: better naming

This commit is contained in:
prssanna 2020-04-29 13:30:05 +05:30
parent bc8620d420
commit 08f740acf8
3 changed files with 8 additions and 4 deletions

View file

@ -9,8 +9,12 @@
"dashboard_name",
"is_default",
"charts",
<<<<<<< HEAD
"default_chart_custom_options",
"cards"
=======
"chart_options"
>>>>>>> fix: better naming
],
"fields": [
{
@ -49,7 +53,7 @@
}
],
"links": [],
"modified": "2020-04-28 14:17:02.391084",
"modified": "2020-04-29 13:26:37.362482",
"modified_by": "Administrator",
"module": "Desk",
"name": "Dashboard",

View file

@ -22,8 +22,8 @@ def get_permitted_charts(dashboard_name):
chart_dict = frappe._dict()
chart_dict.update(chart.as_dict())
if dashboard.get('default_chart_custom_options'):
chart_dict.custom_options = dashboard.get('default_chart_custom_options')
if dashboard.get('chart_options'):
chart_dict.custom_options = dashboard.get('chart_options')
permitted_charts.append(chart_dict)
return permitted_charts

View file

@ -219,7 +219,7 @@
"options": "Dashboard Chart Field"
},
{
"description": " Ex: \"colors\": [\"#d1d8dd\", \"#ff5858\"] (the options set here will override the default custom options set in the Dashboard)",
"description": " Ex: \"colors\": [\"#d1d8dd\", \"#ff5858\"] (the options set here will override the chart options set in the Dashboard)",
"fieldname": "custom_options",
"fieldtype": "Code",
"label": "Custom Options"