Skip to content

Commit

Permalink
user_search_fields: include users
Browse files Browse the repository at this point in the history
This is required with users through connected accounts.
  • Loading branch information
blueyed committed Sep 5, 2018
1 parent f808df7 commit 949241c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pinax/stripe/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
def user_search_fields():
User = get_user_model()
fields = [
"user__{0}".format(User.USERNAME_FIELD)
"user__{0}".format(User.USERNAME_FIELD),
"users__{0}".format(User.USERNAME_FIELD),
]
if "email" in [f.name for f in User._meta.fields]: # pragma: no branch
fields += ["user__email"]
fields += ["user__email", "users__email"]
return fields


Expand Down

0 comments on commit 949241c

Please sign in to comment.