From: Ciro Scognamiglio Date: Fri, 3 Oct 2014 14:16:08 +0000 (+0200) Subject: added debug code X-Git-Tag: myslice-1.2~1^2~17^2~2^2~4 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=46becb7a1b05415bfd176072abb73262dd30c53a added debug code --- diff --git a/manifoldapi/manifoldproxy.py b/manifoldapi/manifoldproxy.py index 3c5a04bc..eef3a694 100644 --- a/manifoldapi/manifoldproxy.py +++ b/manifoldapi/manifoldproxy.py @@ -88,8 +88,10 @@ with the query passed using POST""" # # resource reservation if (manifold_query.action.lower() == 'update') : - for resources in result['value'][0]['resources'] : - activity.slice.resource(request, { 'slice' : result['value'][0]['slice_hrn'], 'resource' : result['value'][0]}) + print result['value'][0] + if 'resources' in result['value'][0] : + for resources in result['value'][0]['resources'] : + activity.slice.resource(request, { 'slice' : result['value'][0]['slice_hrn'], 'resource' : result['value'][0]}) json_answer=json.dumps(result)