From 8a442f4185c87dedc59be6612b48b60e6c1cb63d Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 20 Oct 2020 15:34:44 +0530 Subject: [PATCH] feat: set fieldname before insert (#11675) --- frappe/custom/doctype/custom_field/custom_field.py | 1 + 1 file changed, 1 insertion(+) diff --git a/frappe/custom/doctype/custom_field/custom_field.py b/frappe/custom/doctype/custom_field/custom_field.py index bc325b654e..ee6e3b9c61 100644 --- a/frappe/custom/doctype/custom_field/custom_field.py +++ b/frappe/custom/doctype/custom_field/custom_field.py @@ -32,6 +32,7 @@ class CustomField(Document): self.fieldname = self.fieldname.lower() def before_insert(self): + self.set_fieldname() meta = frappe.get_meta(self.dt, cached=False) fieldnames = [df.fieldname for df in meta.get("fields")]