Преглед изворни кода

[minor] dashboard data load in meta.py

version-14
Rushabh Mehta пре 8 година
родитељ
комит
9fd29e658a
1 измењених фајлова са 4 додато и 2 уклоњено
  1. +4
    -2
      frappe/model/meta.py

+ 4
- 2
frappe/model/meta.py Прегледај датотеку

@@ -281,11 +281,13 @@ class Meta(Document):

This method will return the `data` property in the
`[doctype]_dashboard.py` file in the doctype folder'''
data = frappe._dict()
try:
module = load_doctype_module(self.name, suffix='_dashboard')
data = frappe._dict(module.get_data())
if hasattr(module, 'get_data'):
data = frappe._dict(module.get_data())
except ImportError:
data = frappe._dict()
pass

return data



Loading…
Откажи
Сачувај