From 01a0a0fc0ae858f60361ebed57dd940569defaee Mon Sep 17 00:00:00 2001 From: Rohan Date: Thu, 4 May 2023 17:43:22 +0530 Subject: [PATCH] fix: ignore virtual doctypes during data export (#20891) --- frappe/core/doctype/data_export/exporter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frappe/core/doctype/data_export/exporter.py b/frappe/core/doctype/data_export/exporter.py index 366245b5e8..bc67087151 100644 --- a/frappe/core/doctype/data_export/exporter.py +++ b/frappe/core/doctype/data_export/exporter.py @@ -9,6 +9,7 @@ import frappe import frappe.permissions from frappe import _ from frappe.core.doctype.access_log.access_log import make_access_log +from frappe.model.utils import is_virtual_doctype from frappe.utils import cint, cstr, format_datetime, format_duration, formatdate, parse_json from frappe.utils.csvutils import UnicodeWriter @@ -390,6 +391,8 @@ class DataExporter: if self.all_doctypes: # add child tables for c in self.child_doctypes: + if is_virtual_doctype(c["doctype"]): + continue child_doctype_table = DocType(c["doctype"]) data_row = ( frappe.qb.from_(child_doctype_table)