소스 검색

chore: Rename function to validate conflicting methods and properties

(cherry picked from commit 255a959a3e)
version-14
Gavin D'souza 4 년 전
committed by mergify-bot
부모
커밋
f7f400985b
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. +1
    -1
      frappe/core/doctype/doctype/doctype.py
  2. +2
    -2
      frappe/custom/doctype/custom_field/custom_field.py

+ 1
- 1
frappe/core/doctype/doctype/doctype.py 파일 보기

@@ -1174,7 +1174,7 @@ def make_module_and_roles(doc, perm_fieldname="permissions"):
else:
raise

def check_if_fieldname_conflicts_with_methods(doctype, fieldname):
def check_if_fieldname_conflicts_with_properties_and_methods(doctype, fieldname):
doc = frappe.get_doc({"doctype": doctype})
available_objects = [x for x in dir(doc) if isinstance(x, str)]
property_list = [


+ 2
- 2
frappe/custom/doctype/custom_field/custom_field.py 파일 보기

@@ -64,8 +64,8 @@ class CustomField(Document):
self.translatable = 0

if not self.flags.ignore_validate:
from frappe.core.doctype.doctype.doctype import check_if_fieldname_conflicts_with_methods
check_if_fieldname_conflicts_with_methods(self.dt, self.fieldname)
from frappe.core.doctype.doctype.doctype import check_if_fieldname_conflicts_with_properties_and_methods
check_if_fieldname_conflicts_with_properties_and_methods(self.dt, self.fieldname)

def on_update(self):
if not frappe.flags.in_setup_wizard:


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