Skip to content

Commit

Permalink
article settings form compatibility with custom user model
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Fang committed Jun 17, 2014
1 parent 2671dbf commit 5521c3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wiki/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def __init__(self, article, request, *args, **kwargs):
self.fields['recursive_owner'].widget = forms.HiddenInput()
self.fields['locked'].widget = forms.HiddenInput()

self.fields['owner_username'].initial = article.owner.username if article.owner else ""
self.fields['owner_username'].initial = getattr(article.owner, User.USERNAME_FIELD) if article.owner else ""

def clean_owner_username(self):
if self.can_assign:
Expand Down

0 comments on commit 5521c3b

Please sign in to comment.