adamcharnock/django-hordak

Some search fields for AccountAdmin don't exist

angusholder opened this issue · 4 comments

Searching the accounts admin page fails for me because it can't resolve userprofile. I can't find any reference to userprofile or subscribed_userprofile in the project, can these search fields be removed?

"userprofile__email",
"subscribed_userprofile__email",
"userprofile__first_name",
"subscribed_userprofile__first_name",
"userprofile__last_name",
"subscribed_userprofile__last_name",

They were introduced in this commit dec67a9, but I can't tell where they came from. Could they be referencing a reverse relation in your local setup?

Fixed.

@PetrDlouhy – I think those must have crept in there! I imagine the best way to achieve this is to extend the Admin classes in your local project.

@adamcharnock Sorry for that. Thank you for the solution.

@adamcharnock I think it would be great if we make the some test that will search the admin.
I can look into it, if you aggree.

That's a great idea. I often overlook admin tests but I am always grateful when they exist.