From 7000b91d56bf8528a8a613f7b07f4307d89dffe7 Mon Sep 17 00:00:00 2001 From: dwickwire Date: Wed, 18 Jan 2012 15:18:02 -0600 Subject: [PATCH 1/1] Fixing validation always being thrown on first visit. -- still need to hide errors for hidden fields --- cas_provider/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cas_provider/views.py b/cas_provider/views.py index ba7b0a2..5d9ea38 100644 --- a/cas_provider/views.py +++ b/cas_provider/views.py @@ -73,11 +73,13 @@ def login(request, template_name='cas/login.html', success_redirect='/account/', errors.append('This account is disabled.') else: errors.append('Incorrect username and/or password.') - else: if merge: form = MergeLoginForm(request.GET, request=request) else: form = LoginForm(request.GET, request=request) + else: + form = LoginForm(service) + return render_to_response(template_name, {'form': form, 'errors': errors}, context_instance=RequestContext(request)) def socialauth_login(request, template_name='cas/login.html', success_redirect='/account/'): -- 2.20.1