diff options
| author | Simon Charette <charette.s@gmail.com> | 2025-10-12 12:57:32 -0400 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-10-13 10:42:23 -0300 |
| commit | edde2891c355103ba455f3fea95cff962e40962c (patch) | |
| tree | cb2cb921a39d37012b0cc6997708260effdc1440 /tests/invalid_models_tests | |
| parent | 0f75f8f1ff2078cde3c1701851c754b91c6baf44 (diff) | |
Fixed #36660 -- Fixed a regression in descending Index local field checks.
Regression in 8638d8bf74c1a58302c97d4436ad2eb08438145b.
Refs #36273.
Thanks Federico Bond for the report.
Diffstat (limited to 'tests/invalid_models_tests')
| -rw-r--r-- | tests/invalid_models_tests/test_models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/invalid_models_tests/test_models.py b/tests/invalid_models_tests/test_models.py index faa0db9da7..5780704eae 100644 --- a/tests/invalid_models_tests/test_models.py +++ b/tests/invalid_models_tests/test_models.py @@ -185,6 +185,15 @@ class IndexesTests(TestCase): ], ) + def test_pointing_to_desc_field(self): + class Model(models.Model): + name = models.CharField(max_length=100) + + class Meta: + indexes = [models.Index(fields=["-name"], name="index_name")] + + self.assertEqual(Model.check(databases=self.databases), []) + def test_pointing_to_m2m_field(self): class Model(models.Model): m2m = models.ManyToManyField("self") |
