|
|
@@ -129,6 +129,7 @@ class Document(BaseDocument): |
|
|
|
def load_from_db(self): |
|
|
|
"""Load document and children from database and create properties |
|
|
|
from fields""" |
|
|
|
self.flags.ignore_children = True |
|
|
|
if not getattr(self, "_metaclass", False) and self.meta.issingle: |
|
|
|
single_doc = frappe.db.get_singles_dict(self.doctype, for_update=self.flags.for_update) |
|
|
|
if not single_doc: |
|
|
@@ -150,6 +151,7 @@ class Document(BaseDocument): |
|
|
|
) |
|
|
|
|
|
|
|
super().__init__(d) |
|
|
|
self.flags.pop("ignore_children", None) |
|
|
|
|
|
|
|
for df in self._get_table_fields(): |
|
|
|
# Make sure not to query the DB for a child table, if it is a virtual one. |
|
|
|