Permalink
Browse files

Made session retrieval check environ better.

--HG--
branch : trunk
  • Loading branch information...
1 parent 209dd9a commit 51d211bd42e8b55a3ce0dabf6588328c3e93a57a @bbangert bbangert committed Jun 13, 2008
Showing with 3 additions and 1 deletion.
  1. +3 −1 pylons/templating.py
View
@@ -220,7 +220,9 @@ def pylons_globals():
# If the session was overriden to be None, don't populate the session
# var
- if pylons.config['pylons.environ_config'].get('session', True):
+ econf = pylons.config['pylons.environ_config']
+ if 'beaker.session' in pylons.request.environ or \
+ ('session' in econf and econf['session'] in pylons.request.environ):
pylons_vars['session'] = pylons.session._current_obj()
log.debug("Created render namespace with pylons vars: %s", pylons_vars)
return pylons_vars

0 comments on commit 51d211b

Please sign in to comment.