X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/1a949f7c97dc2f34c135f5cdf088df2927d3d652..6739afe99e21df2a3c4cf7768f967fcf72b4e514:/forum_modules/localauth/forms.py diff --git a/forum_modules/localauth/forms.py b/forum_modules/localauth/forms.py index 06fcb79..961c7da 100644 --- a/forum_modules/localauth/forms.py +++ b/forum_modules/localauth/forms.py @@ -1,4 +1,4 @@ -from forum.utils.forms import NextUrlField, UserNameField, UserEmailField, SetPasswordForm +from forum.forms import NextUrlField, UserNameField, UserEmailField, SetPasswordForm from forum.models import Question from forum.modules import call_all_handlers from django.contrib.contenttypes.models import ContentType @@ -47,7 +47,7 @@ class ClassicLoginForm(forms.Form): def _clean_nonempty_field(self,field): value = None if field in self.cleaned_data: - value = str(self.cleaned_data[field]).strip() + value = self.cleaned_data[field].strip() if value == '': value = None self.cleaned_data[field] = value @@ -92,7 +92,7 @@ class ClassicLoginForm(forms.Form): error_list.append(_('Please enter user name')) if len(error_list) > 0: self._errors['__all__'] = forms.util.ErrorList(error_list) - + return self.cleaned_data def get_user(self):