mirror of
https://github.com/django/django.git
synced 2025-12-15 21:45:20 +00:00
Fixed #31538 -- Fixed Meta.ordering validation lookups that are not transforms.
Regression in 440505cb2c.
Thanks Simon Meers for the report.
This commit is contained in:
parent
d2b9a9fdbb
commit
b73e66e758
3 changed files with 14 additions and 2 deletions
|
|
@ -893,6 +893,15 @@ class OtherModelTests(SimpleTestCase):
|
|||
with register_lookup(models.CharField, Lower):
|
||||
self.assertEqual(Model.check(), [])
|
||||
|
||||
def test_ordering_pointing_to_lookup_not_transform(self):
|
||||
class Model(models.Model):
|
||||
test = models.CharField(max_length=100)
|
||||
|
||||
class Meta:
|
||||
ordering = ('test__isnull',)
|
||||
|
||||
self.assertEqual(Model.check(), [])
|
||||
|
||||
def test_ordering_pointing_to_related_model_pk(self):
|
||||
class Parent(models.Model):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue