summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2025-10-12 12:57:32 -0400
committerNatalia <124304+nessita@users.noreply.github.com>2025-10-13 10:51:22 -0300
commit86e7406cfb839a6c5384e9f72a55ef78eccc9a3c (patch)
tree400730989290f50872ecbeb6004c18902f46a7b1 /django/db
parentc4309f46270432c6d48dfc8b6bf2de20a01d0d6b (diff)
[6.0.x] Fixed #36660 -- Fixed a regression in descending Index local field checks.
Regression in 8638d8bf74c1a58302c97d4436ad2eb08438145b. Refs #36273. Thanks Federico Bond for the report. Backport of edde2891c355103ba455f3fea95cff962e40962c from main.
Diffstat (limited to 'django/db')
-rw-r--r--django/db/models/indexes.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/django/db/models/indexes.py b/django/db/models/indexes.py
index 176f719fe5..a408506527 100644
--- a/django/db/models/indexes.py
+++ b/django/db/models/indexes.py
@@ -114,7 +114,12 @@ class Index:
)
errors.extend(
model._check_local_fields(
- {*self.fields, *self.include, *references}, "indexes"
+ {
+ *[field for field, _ in self.fields_orders],
+ *self.include,
+ *references,
+ },
+ "indexes",
)
)
# Database-feature checks: