From 4e6fb4a5500bf0559ec392a0c3bd1549b80dd9d5 Mon Sep 17 00:00:00 2001 From: AarDG10 Date: Thu, 4 Dec 2025 21:25:57 +0530 Subject: [PATCH] fix(data import): use correct condition for validation of headers --- frappe/core/doctype/data_import/importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/data_import/importer.py b/frappe/core/doctype/data_import/importer.py index ac9665260e..2df0cf3df5 100644 --- a/frappe/core/doctype/data_import/importer.py +++ b/frappe/core/doctype/data_import/importer.py @@ -494,7 +494,7 @@ class ImportFile: frappe.throw(_("Import template should contain a Header row."), title=_("Template Error")) for field in mandatory_fields: - if field not in headers or _(field) not in headers: + if field not in headers and _(field) not in headers: frappe.throw( _( "Mandatory field {0} is missing in the import template for {1}. Please correct the template and try again."