From acfab66239681e7adcc53d46cb7e1ac8c6d02527 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 28 Mar 2013 16:47:47 +0530 Subject: [PATCH] [patch] [fix] substr starts with 1 --- patches/march_2013/p11_update_attach_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/march_2013/p11_update_attach_files.py b/patches/march_2013/p11_update_attach_files.py index 769463a590..ef39ce89f8 100644 --- a/patches/march_2013/p11_update_attach_files.py +++ b/patches/march_2013/p11_update_attach_files.py @@ -11,6 +11,6 @@ def execute(): else: webnotes.conn.sql("""update `tab%(parent)s` set %(fieldname)s = - if(substr(%(fieldname)s,0,4)='http' or substr(%(fieldname)s, 0, 5)='files', + if(substr(%(fieldname)s,1,4)='http' or substr(%(fieldname)s,1,5)='files', %(fieldname)s, concat('files/', %(fieldname)s))""" % f) \ No newline at end of file