Merge branch 'master' of ssh://git.onelab.eu/git/myslice
authorLoic Baron <loic.baron@lip6.fr>
Fri, 13 Dec 2013 17:38:13 +0000 (18:38 +0100)
committerLoic Baron <loic.baron@lip6.fr>
Fri, 13 Dec 2013 17:38:13 +0000 (18:38 +0100)
Conflicts:
manifold/manifoldapi.py

1  2 
manifold/manifoldapi.py
portal/sliceview.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:
 -        # del request.session['manifold']
 -        raise Exception, 'Error running query: %r' % result
+         # 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
 +        # 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" 
@@@ -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)