diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-08-06 13:52:58 -0700 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-08-06 13:52:58 -0700 |
commit | 7dca55fda284f237fff811cf4aaadc70ba9fa640 (patch) | |
tree | 844481bdd727cafe3efd70cfcca73606deb34fa1 | |
parent | Merge pull request #36 from dastergon/cbv (diff) | |
parent | Fix post-SSL login redirect. (diff) | |
download | identity.gentoo.org-7dca55fda284f237fff811cf4aaadc70ba9fa640.tar.gz identity.gentoo.org-7dca55fda284f237fff811cf4aaadc70ba9fa640.tar.bz2 identity.gentoo.org-7dca55fda284f237fff811cf4aaadc70ba9fa640.zip |
Merge pull request #37 from mgorny/bugfixes
Bugfixes
-rw-r--r-- | okupy/accounts/views.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/okupy/accounts/views.py b/okupy/accounts/views.py index b411d97..5b252bf 100644 --- a/okupy/accounts/views.py +++ b/okupy/accounts/views.py @@ -160,7 +160,7 @@ def login(request): if user.is_active: _login(request, user) request.session.set_expiry(900) - return redirect(request.POST.get('next', index)) + return redirect(request.GET.get('next', index)) elif 'ssl_auth_failed' in request.GET: messages.error(request, 'SSL authentication failed: %s' % request.GET['ssl_auth_failed']) @@ -526,9 +526,14 @@ def openid_auth_site(request): elif not send: del sreg_data[fn] elif isinstance(sreg_data[fn], list): - val = form.cleaned_data['which_%s' % fn] - assert(val in sreg_data[fn]) + form_key = 'which_%s' % fn + val = form.cleaned_data[form_key] + if val not in sreg_data[fn]: + raise NotImplementedError( + 'Changing choices not implemented yet') sreg_data[fn] = val + if not auto_auth: + setattr(attrs, form_key, val) if not auto_auth: # save prefs in the db |