Skip to content

Commit

Permalink
Fix for tests failing in admin due to not loading repoze in test
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjones authored and tobes committed Jul 16, 2012
1 parent 0f78505 commit 0a32115
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ckan/lib/base.py
Expand Up @@ -214,9 +214,10 @@ def _identify_user(self):
session.save()

ev = request.environ
pth = getattr(ev['repoze.who.plugins']['friendlyform'],
'logout_handler_path')
h.redirect_to(pth)
if 'repoze.who.plugins' in ev:
pth = getattr(ev['repoze.who.plugins']['friendlyform'],
'logout_handler_path')
h.redirect_to(pth)
else:
c.userobj = self._get_user_for_apikey()
if c.userobj is not None:
Expand Down

0 comments on commit 0a32115

Please sign in to comment.