Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar_network/db/routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar_network/db/routes.py')
-rw-r--r--sugar_network/db/routes.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sugar_network/db/routes.py b/sugar_network/db/routes.py
index 5706587..a796834 100644
--- a/sugar_network/db/routes.py
+++ b/sugar_network/db/routes.py
@@ -94,13 +94,14 @@ class Routes(object):
def delete(self, request):
self.volume[request.resource].delete(request.guid)
- @route('GET', [None, None], arguments={'reply': ('guid',)},
+ @route('GET', [None, None], arguments={'reply': list},
mime_type='application/json')
def get(self, request, reply):
if not reply:
reply = []
for prop in self.volume[request.resource].metadata.values():
- if prop.acl & ACL.READ and not (prop.acl & ACL.LOCAL):
+ if isinstance(prop, StoredProperty) and \
+ prop.acl & ACL.READ and not (prop.acl & ACL.LOCAL):
reply.append(prop.name)
self._preget(request)
doc = self.volume[request.resource].get(request.guid)
@@ -256,7 +257,7 @@ class Routes(object):
self.after_post(doc)
def _preget(self, request):
- reply = request['reply']
+ reply = request.get('reply')
if not reply:
request['reply'] = ('guid',)
else: