diff --git a/VERSION b/VERSION index a4a8ae96..b07178d3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.2-stable+timestamp.2013.03.06.12.23.52 +Version 2.4.2-stable+timestamp.2013.03.06.12.26.28 diff --git a/gluon/dal.py b/gluon/dal.py index 83d92743..2557d3fc 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -2664,9 +2664,9 @@ class PostgreSQLAdapter(BaseAdapter): def CONTAINS(self,first,second,case_sensitive=False): if first.type in ('string','text', 'json'): - key = '%'+str(second).replace('%','%%')+'%' + second = '%'+str(second).replace('%','%%')+'%' elif first.type.startswith('list:'): - key = '%|'+str(second).replace('|','||').replace('%','%%')+'|%' + second = '%|'+str(second).replace('|','||').replace('%','%%')+'|%' op = case_sensitive and self.LIKE or self.ILIKE return op(first,key)