diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.py b/erpnext/selling/report/sales_analytics/sales_analytics.py index b8f7ed80b2fd..56875c8a8f3f 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.py +++ b/erpnext/selling/report/sales_analytics/sales_analytics.py @@ -5,7 +5,7 @@ import frappe from frappe import _, scrub -from frappe.utils import add_days, add_to_date, flt, getdate +from frappe.utils import add_days, add_to_date, flt, getdate, cint from six import iteritems from erpnext.accounts.utils import get_fiscal_year @@ -441,7 +441,7 @@ def get_teams(self): for d in self.group_entries: if d.parent: - self.depth_map.setdefault(d.name, self.depth_map.get(d.parent) + 1) + self.depth_map.setdefault(d.name, cint(self.depth_map.get(d.parent)) + 1) else: self.depth_map.setdefault(d.name, 0)