Commit 10efa6a3 by James Henstridge

Only add the teams extension to the request if we have teams to check.

parent 8c2bcce1
......@@ -111,9 +111,9 @@ def login_begin(request, template_name='openid/login.html',
sreg.SRegRequest(optional=['email', 'fullname', 'nickname']))
# Request team info
launchpad_teams = getattr(settings, 'OPENID_LAUNCHPAD_TEAMS_MAPPING',
{})
openid_request.addExtension(teams.TeamsRequest(launchpad_teams.keys()))
launchpad_teams = getattr(settings, 'OPENID_LAUNCHPAD_TEAMS_MAPPING', {})
if launchpad_teams:
openid_request.addExtension(teams.TeamsRequest(launchpad_teams.keys()))
# Construct the request completion URL, including the page we
# should redirect to.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment