Check framework doesn't allow model's Meta.ordering attribute to have explicit ForeignKey relation fields
|Reported by:||Althalus||Owned by:||nobody|
|Component:||Core (System checks)||Version:||master|
|Severity:||Release blocker||Keywords:||meta, ordering, check framework|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||yes|
In #19195 was introduced a way to perform ordering by ForeignKey field itself (without any joins), e.g. order_by('fk_field_name_id'). But new django 1.7 system check framework does not respect this change and does not at the moment allow such fields to be in model's Meta.ordering attribute.
If you skip this check everything just work as expected, so the only problem is that correct ordering value is treated as invalid.
PS. I've marked this ticket as release blocker because initial ticket had this severity.
Change History (5)
comment:1 Changed 13 months ago by Althalus
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 13 months ago by charettes
- Needs tests set
- Patch needs improvement set
- Triage Stage changed from Unreviewed to Accepted
comment:3 Changed 13 months ago by charettes
- Triage Stage changed from Accepted to Ready for checkin
comment:4 Changed 13 months ago by Simon Charette <charette.s@…>
- Resolution set to fixed
- Status changed from new to closed