From: Sofia Papagiannaki Date: Thu, 2 Aug 2012 17:04:24 +0000 (+0300) Subject: Merge branch 'master' of https://code.grnet.gr/git/astakos X-Git-Tag: astakos/v0.7.2^0 X-Git-Url: https://code.grnet.gr/git/astakos/commitdiff_plain/8df55b7a996ee9ae45a372444aebbd9701c6eb92 Merge branch 'master' of https://code.grnet.gr/git/astakos Conflicts: snf-astakos-app/astakos/im/forms.py --- 8df55b7a996ee9ae45a372444aebbd9701c6eb92 diff --cc snf-astakos-app/astakos/im/forms.py index 2e136ae,d22a985..8f22a15 --- a/snf-astakos-app/astakos/im/forms.py +++ b/snf-astakos-app/astakos/im/forms.py @@@ -319,10 -320,10 +320,10 @@@ class LoginForm(AuthenticationForm) check = captcha.submit(rcf, rrf, RECAPTCHA_PRIVATE_KEY, self.ip) if not check.is_valid: raise forms.ValidationError(_('You have not entered the correct words')) - + def clean(self): super(LoginForm, self).clean() - if self.user_cache.provider != 'local': + if self.user_cache and self.user_cache.provider not in ('local', ''): raise forms.ValidationError(_('Local login is not the current authentication method for this account.')) return self.cleaned_data