adamcharnock / django-hordak

Double entry accounting in Django
http://django-hordak.readthedocs.io
MIT License
228 stars 55 forks source link

Some search fields for AccountAdmin don't exist #107

Closed angusholder closed 1 month ago

angusholder commented 8 months ago

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? https://github.com/adamcharnock/django-hordak/blob/0108808204fd41e40f7f4d7dfa05ec440e1070cc/hordak/admin.py#L36-L41

They were introduced in this commit https://github.com/adamcharnock/django-hordak/commit/dec67a993b0db3fc4a8ff790f8d650f4f0893889, but I can't tell where they came from. Could they be referencing a reverse relation in your local setup?

adamcharnock commented 1 month ago

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.

PetrDlouhy commented 1 month ago

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

PetrDlouhy commented 1 month ago

@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.

adamcharnock commented 1 month ago

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