Pārlūkot izejas kodu

Merge pull request #13309 from gavindsouza/exempt-button-customize

fix(DocType): Skip field name conflict validation for No value fields
version-14
mergify[bot] pirms 4 gadiem
committed by GitHub
vecāks
revīzija
1ac27efa7a
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. +4
    -2
      frappe/core/doctype/doctype/doctype.py

+ 4
- 2
frappe/core/doctype/doctype/doctype.py Parādīt failu

@@ -18,6 +18,7 @@ from frappe import _
from frappe.utils import now, cint
from frappe.model import no_value_fields, default_fields, data_fieldtypes, table_fields, data_field_options
from frappe.model.document import Document
from frappe.model.base_document import get_controller
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
from frappe.desk.notifications import delete_notification_count_for
@@ -107,8 +108,6 @@ class DocType(Document):
if self.name in core_doctypes:
return

from frappe.model.base_document import get_controller

try:
controller = get_controller(self.name)
except ImportError:
@@ -123,6 +122,9 @@ class DocType(Document):
}

for docfield in self.get("fields") or []:
if docfield.fieldtype in no_value_fields:
continue

conflict_type = None
field = docfield.fieldname
field_label = docfield.label or docfield.fieldname


Notiek ielāde…
Atcelt
Saglabāt