Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change value field match conditions in jazzmin_list_filter template tag #480

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maltalk
Copy link

@maltalk maltalk commented Feb 10, 2023

Hi,

This PR solves Issue #479

The problem appears when 2 list filters can match between them in key.startswith(field_key + "__") condition.

In order to prevent this i added a condition to check on count of string "__" in both key and field_key variables.

I don't know if it's the best solution or even if works with all existing use cases as i don't know them all and couldn't find one where it goes wrong.

Copy link

@n1ngu n1ngu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bugfix feels right to me but it is somewhat confusing. I'd really enjoy a unittest for the bug but I am clueless on how to write one. Sadly, few jazzmin tags feature a specific unit test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants