X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rest%2F__init__.py;h=c3484835a9863351e62da511febb4f9b6275d24e;hb=c457730e8d49ee507846edeb8a474374f0122f25;hp=a8565963546a762a88ad2672103e85d694b25f0a;hpb=a968cf61c4c7bc122108fb37fac8cdc111f466e6;p=unfold.git diff --git a/rest/__init__.py b/rest/__init__.py index a8565963..c3484835 100644 --- a/rest/__init__.py +++ b/rest/__init__.py @@ -1,5 +1,6 @@ from manifold.core.query import Query from manifoldapi.manifoldapi import execute_query +from portal.actions import is_pi from django.http import HttpResponse @@ -45,8 +46,7 @@ class ObjectRequest(object): table = self.type.split(':') prefix = table[0] table = table[1] - - if prefix is 'local': + if prefix == 'local': # XXX TODO: find a generic Query to get the fields like # select column.name from local:object where table == local:user table = self.type.split(':') @@ -114,6 +114,8 @@ class ObjectRequest(object): query.filter_by(k, '<=', f[2:]) elif (f[:1] == "<") : query.filter_by(k, '<', f[1:]) + elif (f[:8] == "CONTAINS") : + query.filter_by(k, 'CONTAINS', f[8:]) else : query.filter_by(k, '==', f) return query