From 6f2e299883d2a7c65a7715e92fcd903cf55043c5 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Sat, 12 Jul 2014 09:47:07 +0530 Subject: [PATCH] Custom Field: clear cache before validating fields --- frappe/core/doctype/custom_field/custom_field.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/core/doctype/custom_field/custom_field.py b/frappe/core/doctype/custom_field/custom_field.py index 0180b996cf..852786f914 100644 --- a/frappe/core/doctype/custom_field/custom_field.py +++ b/frappe/core/doctype/custom_field/custom_field.py @@ -33,10 +33,10 @@ class CustomField(Document): # validate field from frappe.core.doctype.doctype.doctype import validate_fields_for_doctype - validate_fields_for_doctype(self.dt) - frappe.clear_cache(doctype=self.dt) + validate_fields_for_doctype(self.dt) + # create property setter to emulate insert after self.create_property_setter()