Merge pull request #35074 from AarDG10/fix-di-validations

fix(data import): use correct condition for validation of headers
This commit is contained in:
Aarol D'Souza 2025-12-04 21:37:28 +05:30 committed by GitHub
commit e1c213dd52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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."