From ca31a19eb7da1fa7fb9295911662fb55c14754a2 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 23 Oct 2024 18:14:30 +0530 Subject: [PATCH] fix: validate fieldname --- .../doctype/accounting_dimension/accounting_dimension.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py index db99bcd223b..8fc22dd7650 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py @@ -7,6 +7,7 @@ import json import frappe from frappe import _, scrub from frappe.custom.doctype.custom_field.custom_field import create_custom_field +from frappe.database.schema import validate_column_name from frappe.model import core_doctypes_list from frappe.model.document import Document from frappe.utils import cstr @@ -60,6 +61,7 @@ class AccountingDimension(Document): if not self.is_new(): self.validate_document_type_change() + validate_column_name(self.fieldname) self.validate_dimension_defaults() def validate_document_type_change(self):