[patch] [fix] substr starts with 1

This commit is contained in:
Rushabh Mehta 2013-03-28 16:47:47 +05:30
parent 2fe802c81e
commit acfab66239

View File

@ -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)