Sfoglia il codice sorgente

[minor] dashboard data load in meta.py

version-14
Rushabh Mehta 8 anni fa
parent
commit
9fd29e658a
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. +4
    -2
      frappe/model/meta.py

+ 4
- 2
frappe/model/meta.py Vedi File

@@ -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



Caricamento…
Annulla
Salva