fixed issue 1084

This commit is contained in:
mdipierro
2012-10-12 22:16:23 -05:00
parent 8a2d18b63b
commit 2b1d9acba5
3 changed files with 11 additions and 2 deletions
+4
View File
@@ -6565,6 +6565,10 @@ def smart_query(fields,text):
elif op == 'startswith': new_query = field.startswith(value)
elif op == 'endswith': new_query = field.endswith(value)
else: raise RuntimeError, "Invalid operation"
elif field._db._adapter.dbengine=='google:datastore' and \
field.type in ('list:integer', 'list:string', 'list:reference'):
if op == 'contains': new_query = field.contains(value)
else: raise RuntimeError, "Invalid operation"
else: raise RuntimeError, "Invalid operation"
if neg: new_query = ~new_query
if query is None: