Skip to content

Commit

Permalink
Merge pull request pinax#119 from blueyed/user_search_fields
Browse files Browse the repository at this point in the history
user_search_fields: include users
  • Loading branch information
blueyed authored Sep 5, 2018
2 parents f808df7 + 949241c commit b8a6dd2
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 b8a6dd2

Please sign in to comment.