mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #29408 -- Added validation of related fields and lookups in model Meta.ordering.
This commit is contained in:
committed by
Mariusz Felisiak
parent
4dcbe6eb2d
commit
440505cb2c
@@ -19,6 +19,15 @@ except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
class TestModelMetaOrdering(PostgreSQLTestCase):
|
||||
def test_ordering_by_json_field_value(self):
|
||||
class TestJSONModel(JSONModel):
|
||||
class Meta:
|
||||
ordering = ['field__value']
|
||||
|
||||
self.assertEqual(TestJSONModel.check(), [])
|
||||
|
||||
|
||||
class TestSaveLoad(PostgreSQLTestCase):
|
||||
def test_null(self):
|
||||
instance = JSONModel()
|
||||
|
||||
Reference in New Issue
Block a user