From 949241c2d7cff62bd9348fe4126056bf7f4c7d13 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 5 Sep 2018 19:41:31 +0200 Subject: [PATCH] user_search_fields: include users This is required with users through connected accounts. --- pinax/stripe/admin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pinax/stripe/admin.py b/pinax/stripe/admin.py index 586431f1d..ece84a1bc 100644 --- a/pinax/stripe/admin.py +++ b/pinax/stripe/admin.py @@ -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