Ver código fonte

[fix] exclude docfields from callable method generator (#3676)

version-14
Saurabh 8 anos atrás
committed by Makarand Bauskar
pai
commit
28fb74b412
1 arquivos alterados com 1 adições e 2 exclusões
  1. +1
    -2
      frappe/core/doctype/doctype/doctype.py

+ 1
- 2
frappe/core/doctype/doctype/doctype.py Ver arquivo

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


Carregando…
Cancelar
Salvar