瀏覽代碼

[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…
取消
儲存