소스 검색

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

version-14
Saurabh 8 년 전
committed by Makarand Bauskar
부모
커밋
28fb74b412
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. +1
    -2
      frappe/core/doctype/doctype/doctype.py

+ 1
- 2
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))


불러오는 중...
취소
저장