Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar_network
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2012-10-03 18:17:19 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2012-10-03 18:17:19 (GMT)
commit2f6032c0a28d8dbd1d4ea963cdd381493e875dfa (patch)
tree3940fbbd16417b8072ef109d3ff30744de7d0ed9 /sugar_network
parent34a3906f98173d82240dd3e942b9c9a59e33a775 (diff)
GET command requests might be without guids
Diffstat (limited to 'sugar_network')
-rw-r--r--sugar_network/resources/volume.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sugar_network/resources/volume.py b/sugar_network/resources/volume.py
index d6867ba..03b1816 100644
--- a/sugar_network/resources/volume.py
+++ b/sugar_network/resources/volume.py
@@ -214,6 +214,12 @@ class Commands(object):
return result
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'):
@@ -227,7 +233,7 @@ class Commands(object):
document = request['document']
for props in result:
- guid = props.get('guid') or request['guid']
+ guid = props.get('guid') or requested_guid
for name, value in props.items():
if not isinstance(value, ad.PropertyMeta):
continue