{{{
class SampleModel(models.Model):
name = models.CharField(null=True, max_length=255)
class Meta:
ordering = [F('name').asc(nulls_last=True)]
}}}
Running `makemigrations` always results in the ordering changing for
`SampleModel`, think maybe this was introduced when trying to solve #32632
since for:
{{{
a = F('name').asc(nulls_last=True)
b = F('name').asc(nulls_last=True)
}}}
In Django 3.2 `a == b` but in Django 3.2.1 `a != b`
--
Ticket URL: <https://code.djangoproject.com/ticket/32714>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Simon Charette
* status: new => assigned
* severity: Normal => Release blocker
Comment:
Likely introduced by
https://github.com/django/django/commit/c8b659430556dca0b2fe27cf2ea0f8290dbafecd
#diff-
359ab56295cce36b9597e1d65185f695f271955617b40f43df58ce3fe76fd0c8R1195
--
Ticket URL: <https://code.djangoproject.com/ticket/32714#comment:1>
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/32714#comment:2>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32714#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"96f55ccf798c7592a1203f798a4dffaf173a9263" 96f55ccf]:
{{{
#!CommitTicketReference repository=""
revision="96f55ccf798c7592a1203f798a4dffaf173a9263"
Fixed #32714 -- Prevented recreation of migration for Meta.ordering with
OrderBy expressions.
Regression in c8b659430556dca0b2fe27cf2ea0f8290dbafecd.
Thanks Kevin Marsh for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32714#comment:4>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"364098fdac597d2293d844d81ab523c22ca5a361" 364098fd]:
{{{
#!CommitTicketReference repository=""
revision="364098fdac597d2293d844d81ab523c22ca5a361"
[3.2.x] Fixed #32714 -- Prevented recreation of migration for
Meta.ordering with OrderBy expressions.
Regression in c8b659430556dca0b2fe27cf2ea0f8290dbafecd.
Thanks Kevin Marsh for the report.
Backport of 96f55ccf798c7592a1203f798a4dffaf173a9263 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32714#comment:5>
Comment (by Johannes Maron):
Mariusz, any chance to speed up release. I'm having trouble to apply the
patch for CVE-2021-31542 without this change. And seeing that the patch
for CVE-2021-31542 is rather large, I don't really want to backport it.
--
Ticket URL: <https://code.djangoproject.com/ticket/32714#comment:6>
Comment (by Mariusz Felisiak):
Johannes, a set of releases will be issued tomorrow.
--
Ticket URL: <https://code.djangoproject.com/ticket/32714#comment:7>
* cc: Johannes Maron (added)
Comment:
👍
--
Ticket URL: <https://code.djangoproject.com/ticket/32714#comment:8>