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
Bug in M2M Filter #41
Conversation
I'm not sure about this patch. What if there are two options and people want to select both? Or three options? Or four? I think it would rather make sense to somehow optimize the query in case all options are selected rather then to drop m2m relationships completely. |
That's a separate issue that this line of code was originally intended to solve. All this patch addresses is a smaller but more immediate bug. |
It addresses your immediate problem because you have one record in your db, but it doesn't address mine because I happen to have two. IMO the best and the easiest way to address it would be to drop checking the number of rows selected at all. Just trust the user. If he wants to select all related records so be it! |
At this point I'm open to that as well. We had originally intended to have a way to stop cases where users were selecting all as a means of expressing that they don't want anything excluded but this solution proved to be too simplistic. |
I see. From the user perspective it does make sense. I think there are two distinct cases when selecting all m2m records:
Did I get it right? |
you get it right and I agree but I'd still find my query logs were full of incidents where people would just CTRL+A in the second case. |
Latest commit by Alex was missing (51b39fc)
"XMLField is no longer in Django 1.4"
Can you update the patch to merge cleanly and add tests? |
Closing due to no reaction. |
If for some reason an M2M field only has one option, this line will display no options whatsoever.
This line was originally written to preclude people selecting all options in M2M blindly