Skip to content

Commit c112f6f

Browse files
authored
Merge pull request #870 from fproldan/backport-869-to-diamoerp-staging
[Backport diamoerp-staging] fix: sales analytics
2 parents 8a889a5 + 840277e commit c112f6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

erpnext/selling/report/sales_analytics/sales_analytics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import frappe
77
from frappe import _, scrub
8-
from frappe.utils import add_days, add_to_date, flt, getdate
8+
from frappe.utils import add_days, add_to_date, flt, getdate, cint
99
from six import iteritems
1010

1111
from erpnext.accounts.utils import get_fiscal_year
@@ -441,7 +441,7 @@ def get_teams(self):
441441

442442
for d in self.group_entries:
443443
if d.parent:
444-
self.depth_map.setdefault(d.name, self.depth_map.get(d.parent) + 1)
444+
self.depth_map.setdefault(d.name, cint(self.depth_map.get(d.parent)) + 1)
445445
else:
446446
self.depth_map.setdefault(d.name, 0)
447447

0 commit comments

Comments
 (0)