[file] [patch fix]
diff --git a/patches/april_2013/p05_update_file_data.py b/patches/april_2013/p05_update_file_data.py
index 9fed8a4..a5540cc 100644
--- a/patches/april_2013/p05_update_file_data.py
+++ b/patches/april_2013/p05_update_file_data.py
@@ -11,8 +11,9 @@
fieldname='file_list' and fieldtype='Text'"""):
if doctype in singles:
doc = webnotes.doc(doctype, doctype)
- update_for_doc(doctype, doc)
- webnotes.conn.set_value(doctype, None, "file_list", None)
+ if doc.file_list:
+ update_for_doc(doctype, doc)
+ webnotes.conn.set_value(doctype, None, "file_list", None)
else:
try:
for doc in webnotes.conn.sql("""select name, file_list from `tab%s` where