Dashboard charts: cannot unpack non-iterable NoneType object
Created by: vic-t
The default dashboard shipped with ERPNext cannot be opened with the current Libracore fork.
The problem seems to be with chart type "custom" where the chart source is "account balance timeline".
Error report:
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 63, in application
response = frappe.api.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1036, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/page/dashboard/dashboard.py", line 27, in wrapper
results = generate_and_cache_results(chart, chart_name, function, cache_key)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/page/dashboard/dashboard.py", line 32, in generate_and_cache_results
results = function(chart_name = chart_name)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.py", line 37, in get
gl_entries = get_gl_entries(account, get_period_ending(to_date, timegrain))
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.py", line 80, in get_gl_entries
child_accounts = get_descendants_of('Account', account, ignore_permissions=True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/nestedset.py", line 281, in get_descendants_of
lft, rgt = frappe.db.get_value(doctype, name, ['lft', 'rgt'])
TypeError: cannot unpack non-iterable NoneType object