From 174cbd99f75e078ca2fa5d07def3a7df88627aa4 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 26 Jul 2016 08:56:42 +0530 Subject: [PATCH] [fix] tests --- frappe/custom/doctype/custom_field/custom_field.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/custom/doctype/custom_field/custom_field.py b/frappe/custom/doctype/custom_field/custom_field.py index 40cca1cb15..8a7edfd319 100644 --- a/frappe/custom/doctype/custom_field/custom_field.py +++ b/frappe/custom/doctype/custom_field/custom_field.py @@ -47,7 +47,7 @@ class CustomField(Document): # update the schema if (self.fieldname not in frappe.db.get_table_columns(self.dt) - or self._old_fieldtype != self.fieldtype): + or getattr(self, "_old_fieldtype", None) != self.fieldtype): from frappe.model.db_schema import updatedb updatedb(self.dt)