fix: error in report when data is not available to load chart in report (#36842)
This commit is contained in:
parent
eb5c61be1e
commit
3a2933db4d
@ -156,6 +156,8 @@ def get_data(filters):
|
|||||||
|
|
||||||
|
|
||||||
def prepare_chart_data(data, filters):
|
def prepare_chart_data(data, filters):
|
||||||
|
if not data:
|
||||||
|
return
|
||||||
labels_values_map = {}
|
labels_values_map = {}
|
||||||
if filters.filter_based_on not in ("Date Range", "Fiscal Year"):
|
if filters.filter_based_on not in ("Date Range", "Fiscal Year"):
|
||||||
filters_filter_based_on = "Date Range"
|
filters_filter_based_on = "Date Range"
|
||||||
|
Loading…
Reference in New Issue
Block a user