X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rest%2F__init__.py;h=c3484835a9863351e62da511febb4f9b6275d24e;hb=c457730e8d49ee507846edeb8a474374f0122f25;hp=96b901f72d2eb4eaab8eb75fb7a381a3d3887a6e;hpb=a73bbba1440c531085bce424582a7a96b8906ba2;p=unfold.git diff --git a/rest/__init__.py b/rest/__init__.py index 96b901f7..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(':') @@ -74,7 +74,6 @@ class ObjectRequest(object): def setKey(self): # What about key formed of multiple fields??? query = Query.get('local:object').filter_by('table', '==', self.type).select('key') - print query results = execute_query(self.request, query) print "key of object = %s" % results if results :