From 7bd7c8769ef6eb472b9b0dde5653859ccaa7150d Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 29 Apr 2013 14:21:58 +0530 Subject: [PATCH] [patch] [file data] files in update file data patch --- .../april_2013/p07_update_file_data_custom_field.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/april_2013/p07_update_file_data_custom_field.py diff --git a/patches/april_2013/p07_update_file_data_custom_field.py b/patches/april_2013/p07_update_file_data_custom_field.py new file mode 100644 index 0000000000..909df0554d --- /dev/null +++ b/patches/april_2013/p07_update_file_data_custom_field.py @@ -0,0 +1,11 @@ +import webnotes +def execute(): + from patches.april_2013.p05_update_file_data import update_file_list, get_single_doctypes + singles = get_single_doctypes() + for doctype in webnotes.conn.sql("""select parent from `tabCustom Field` where + fieldname='file_list' and fieldtype='Text'"""): + update_file_list(doctype, singles) + + webnotes.conn.sql("""delete from `tabCustom Field` where fieldname='file_list' + and parent=%s""", doctype) + \ No newline at end of file