Commit 0d012c72 by benjaoming

Merge pull request #346 from jandebleser/master

Fixed problem with cleaning the username when the application is using a...
parents e9495a8f 87f964a8
...@@ -392,7 +392,8 @@ class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm): ...@@ -392,7 +392,8 @@ class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm):
username = self.cleaned_data['owner_username'] username = self.cleaned_data['owner_username']
if username: if username:
try: try:
user = User.objects.get(username=username) kwargs = {User.USERNAME_FIELD: username}
user = User.objects.get(**kwargs)
except User.DoesNotExist: except User.DoesNotExist:
raise forms.ValidationError(ugettext('No user with that username')) raise forms.ValidationError(ugettext('No user with that username'))
else: else:
......
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