From 28fb74b4123f578d1b350c1ca964453ef241990c Mon Sep 17 00:00:00 2001 From: Saurabh Date: Thu, 13 Jul 2017 13:28:21 +0530 Subject: [PATCH] [fix] exclude docfields from callable method generator (#3676) --- frappe/core/doctype/doctype/doctype.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frappe/core/doctype/doctype/doctype.py b/frappe/core/doctype/doctype/doctype.py index 465dacf63f..f4563876ed 100644 --- a/frappe/core/doctype/doctype/doctype.py +++ b/frappe/core/doctype/doctype/doctype.py @@ -773,8 +773,7 @@ def init_list(doctype): def check_if_fieldname_conflicts_with_methods(doctype, fieldname): doc = frappe.get_doc({"doctype": doctype}) - method_list = [method for method in dir(doc) if callable(getattr(doc, method))] + method_list = [method for method in dir(doc) if isinstance(method, str) and callable(getattr(doc, method))] if fieldname in method_list: frappe.throw(_("Fieldname {0} conflicting with meta object").format(fieldname)) -