Wrappe frappe._dict

`frappe.get_attr(hook)(data=data)` return dict. But function `get_open_count` will access `fieldname` attribute in notifications.py.
 I will cause error `'dict' object has no attribute 'fieldname'`.
This commit is contained in:
SDLyu 2020-05-21 18:47:00 +08:00 committed by GitHub
parent 4e197c56d6
commit 3e9d8d05e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -437,7 +437,7 @@ class Meta(Document):
if not self.custom:
for hook in frappe.get_hooks("override_doctype_dashboards", {}).get(self.name, []):
data = frappe.get_attr(hook)(data=data)
data = frappe._dict(frappe.get_attr(hook)(data=data))
return data