X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=manifoldapi%2Fmanifoldproxy.py;fp=manifoldapi%2Fmanifoldproxy.py;h=433a854b57152d40b9ed96be88a4319c87416d12;hb=6a3f5d4949171451d5df2df5d0f96e9eb396f29c;hp=76f61654ccf47eb75f529b9949129066403b6511;hpb=583c62239bbf6be5222e170609e547349389c1c1;p=unfold.git diff --git a/manifoldapi/manifoldproxy.py b/manifoldapi/manifoldproxy.py index 76f61654..433a854b 100644 --- a/manifoldapi/manifoldproxy.py +++ b/manifoldapi/manifoldproxy.py @@ -55,10 +55,12 @@ with the query passed using POST""" admin_user, admin_password = ConfigEngine().manifold_admin_user_password() manifold_api_session_auth = {'AuthMethod': 'password', 'Username': admin_user, 'AuthString': admin_password} else: - print manifold_query - print request.session['manifold'] - manifold_api_session_auth = request.session['manifold']['auth'] - + if 'manifold' in request.session: + manifold_api_session_auth = request.session['manifold']['auth'] + else: + json_answer=json.dumps({'code':0,'value':[]}) + return HttpResponse (json_answer, mimetype="application/json") + if debug_empty and manifold_query.action.lower()=='get': json_answer=json.dumps({'code':0,'value':[]}) print "By-passing : debug_empty & 'get' request : returning a fake empty list"