mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #29408 -- Added validation of related fields and lookups in model Meta.ordering.
This commit is contained in:
parent
4dcbe6eb2d
commit
440505cb2c
4 changed files with 125 additions and 6 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue