From: Loic Baron Date: Fri, 13 Dec 2013 17:38:13 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.onelab.eu/git/myslice X-Git-Tag: myslice-0.3-0~89 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=ef9e572f3c703640218a44ea7f86aa71805cbcfe Merge branch 'master' of ssh://git.onelab.eu/git/myslice Conflicts: manifold/manifoldapi.py --- ef9e572f3c703640218a44ea7f86aa71805cbcfe diff --cc manifold/manifoldapi.py index f8c33f98,25b80f9c..6639d484 --- a/manifold/manifoldapi.py +++ b/manifold/manifoldapi.py @@@ -132,11 -132,11 +132,14 @@@ def _execute_query(request, query, mani print "-"*80 result = manifold_api.forward(query.to_dict()) if result['code'] == 2: + # this is gross; at the very least we need to logout() + # but most importantly there is a need to refine that test, since + # code==2 does not necessarily mean an expired session - # del request.session['manifold'] - raise Exception, 'Error running query: %r' % result + # XXX only if we know it is the issue + del request.session['manifold'] + # Flush django session + request.session.flush() + #raise Exception, 'Error running query: %r' % result if result['code'] == 1: print "WARNING" diff --cc portal/sliceview.py index 032b6485,2d77bdfe..618e0bb5 --- a/portal/sliceview.py +++ b/portal/sliceview.py @@@ -79,10 -78,12 +80,10 @@@ class SliceView (LoginRequiredAutoLogou ) # for internal use in the querytable plugin; # needs to be a unique column present for each returned record - #main_query_key = 'hrn' + main_query_init_key = 'hostname' query_resource_all = Query.get('resource').select(resource_fields) - if do_query_users: - query_user_all = Query.get('user').select(user_fields) - + aq = AnalyzedQuery(main_query, metadata=metadata) page.enqueue_query(main_query, analyzed_query=aq) page.enqueue_query(query_resource_all)