mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-26 14:41:42 +01:00
fix: error in report when data is not available to load chart in report (#36842)
(cherry picked from commit 3a2933db4d)
Co-authored-by: ViralKansodiya <141210323+viralkansodiya@users.noreply.github.com>
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user