#12340 closed (fixed)
`BaseGenericInlineFormSet.get_queryset` returns an unordered queryset
Reported by: | jbronn | Owned by: | jbronn |
---|---|---|---|
Component: | Contrib apps | Version: | dev |
Severity: | Keywords: | generic inline | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The parent class, BaseModelFormSet
, [source:django/trunk/django/forms/models.py@11688#L481 orders the queryset it returns], and so should BaseGenericInline
. An important reason to do this is that BaseFormSet._construct_form
uses [source:django/trunk/django/forms/models.py@11688#L478 queryset slicing] at an integer index, and if the QuerySet
returned is unordered, then it's possible to get the same model for a different integer index.
Attachments (1)
Change History (4)
by , 15 years ago
Attachment: | generic_inline_order_qs_v1.diff added |
---|
comment:1 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
Note:
See TracTickets
for help on using tickets.
Orders the queryset.