Opened 7 years ago
Closed 7 years ago
#30247 closed Bug (invalid)
ModelMultipleChoiceField Bug - Initial Values has to be in queryset, does not make sense
| Reported by: | Josef Korbel | Owned by: | nobody |
|---|---|---|---|
| Component: | Forms | Version: | 2.1 |
| Severity: | Normal | Keywords: | ModelMultipleChoiceField |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When using ModelMultipleChoiceField, the initial values need to be in the queryset, or the widget will be empty. As my queryset is collection of unassigned objects, my initial will never by in my queryset, thus making this undoable for me, here are more details on SO.
Change History (2)
comment:1 by , 7 years ago
| Component: | Uncategorized → Forms |
|---|---|
| Type: | Uncategorized → Bug |
comment:2 by , 7 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
You've misunderstood what's going on here.
querysetin this case means the set of allowed values. All values, whether initial or not, must be inqueryset.If you're not clear on this please see TicketClosingReasons/UseSupportChannels.