Opened 8 years ago
Closed 8 years ago
#26796 closed Cleanup/optimization (fixed)
Add a check for limit_choices_to on ManyToManyField with an explicit through model
Reported by: | Simon Charette | Owned by: | Kevan Swanberg |
---|---|---|---|
Component: | Core (System checks) | Version: | dev |
Severity: | Normal | Keywords: | 1.11 |
Cc: | kevswanberg@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
As documented:
limit_choices_to has no effect when used on a ManyToManyField with a custom intermediate table specified using the through parameter.
ManyToManyField._check_ignored_options
seems like the perfect place to add this check.
Change History (11)
comment:1 by , 8 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 4 comment:3 by , 8 years ago
comment:4 by , 8 years ago
Replying to andersonresende:
What should be the warning message?
Have a look at the other messages in ManyToManyField._check_ignored_options
.
Something along the line of limit_choices_to has no effect on ManyToManyField with an explicit intermediary model. should do?
comment:6 by , 8 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:8 by , 8 years ago
Has patch: | unset |
---|---|
Keywords: | 1.11 added |
Resolution: | fixed |
Status: | closed → new |
Triage Stage: | Ready for checkin → Accepted |
Reopening as this doesn't seem to be working correctly.
comment:9 by , 8 years ago
Cc: | added |
---|---|
Has patch: | set |
Owner: | changed from | to
Status: | new → assigned |
comment:11 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
What should be the warning message?