Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar_network/resources/volume.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2012-10-07 07:29:41 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2012-10-07 12:10:27 (GMT)
commit0455f6f0a8fda5586ac2b708acd68abda864b230 (patch)
treeb77c063a3a8035ef0251fb8bfe4e5e9425a14fdd /sugar_network/resources/volume.py
parent054ea99ccd67e73919edb216480567796e57098b (diff)
Fail if there is no way to return BLOB urls in GET requests and avoid returning raw BLOB meta
Diffstat (limited to 'sugar_network/resources/volume.py')
-rw-r--r--sugar_network/resources/volume.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/sugar_network/resources/volume.py b/sugar_network/resources/volume.py
index a8f732b..440551a 100644
--- a/sugar_network/resources/volume.py
+++ b/sugar_network/resources/volume.py
@@ -215,11 +215,6 @@ class Commands(object):
def _mixin_blobs(self, request, result):
requested_guid = request.get('guid')
- if not requested_guid:
- reply = request.get('reply')
- if reply and 'guid' not in reply:
- return
-
if node.static_url.value:
prefix = node.static_url.value
elif hasattr(request, 'environ'):
@@ -237,6 +232,8 @@ class Commands(object):
for name, value in props.items():
if not isinstance(value, ad.PropertyMeta):
continue
+ enforce(guid, 'No way to get BLOB urls if %r was not '
+ 'in %r parameter', 'guid', 'reply')
props[name] = value.url(
default='/'.join(['', document, guid, name]) + postfix,
prefix=prefix)