Pārlūkot izejas kodu

fix: dont assume issingle exists (#18236) (#18252)

(cherry picked from commit 0e0e7f276c)

Co-authored-by: Ankush Menat <ankush@frappe.io>
version-14
mergify[bot] pirms 2 gadiem
committed by GitHub
vecāks
revīzija
6164921304
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      frappe/model/base_document.py

+ 2
- 2
frappe/model/base_document.py Parādīt failu

@@ -744,7 +744,7 @@ class BaseDocument:
# don't cache if fetching other values too # don't cache if fetching other values too
values = frappe.db.get_value(doctype, docname, values_to_fetch, as_dict=True) values = frappe.db.get_value(doctype, docname, values_to_fetch, as_dict=True)


if frappe.get_meta(doctype).issingle:
if getattr(frappe.get_meta(doctype), "issingle", 0):
values.name = doctype values.name = doctype


if frappe.get_meta(doctype).get("is_virtual"): if frappe.get_meta(doctype).get("is_virtual"):
@@ -884,7 +884,7 @@ class BaseDocument:
if frappe.flags.in_install: if frappe.flags.in_install:
return return


if self.meta.issingle:
if getattr(self.meta, "issingle", 0):
# single doctype value type is mediumtext # single doctype value type is mediumtext
return return




Notiek ielāde…
Atcelt
Saglabāt