From 35535e993123b479d137e4871269ddbe617c851b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 1 Nov 2012 12:20:13 +0530 Subject: [PATCH] fix in custom field patch --- patches/november_2012/custom_field_insert_after.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/patches/november_2012/custom_field_insert_after.py b/patches/november_2012/custom_field_insert_after.py index 403f88d83c..6824e7a5e1 100644 --- a/patches/november_2012/custom_field_insert_after.py +++ b/patches/november_2012/custom_field_insert_after.py @@ -6,6 +6,7 @@ def execute(): for name, insert_after in webnotes.conn.sql("""select name, insert_after from `tabCustom Field`"""): - new_insert_after = regex.sub("", insert_after) - webnotes.conn.set_value("Custom Field", name, "insert_after", new_insert_after) + if insert_after: + new_insert_after = regex.sub("", insert_after) + webnotes.conn.set_value("Custom Field", name, "insert_after", new_insert_after) \ No newline at end of file