#22711 closed Bug (fixed)
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: | dev |
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 |
Easy pickings: | no | UI/UX: | no |
Description
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 by , 11 years ago
comment:2 by , 11 years ago
Needs tests: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
Left comment on the PR.
comment:3 by , 11 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Patch looks good to me, will test locally and commit.
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Created pull request on GitHib: https://github.com/django/django/pull/2723