浏览代码

[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 This method will return the `data` property in the
`[doctype]_dashboard.py` file in the doctype folder''' `[doctype]_dashboard.py` file in the doctype folder'''
data = frappe._dict()
try: try:
module = load_doctype_module(self.name, suffix='_dashboard') 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: except ImportError:
data = frappe._dict()
pass


return data return data




正在加载...
取消
保存