#36660: False-positive E012 check error when index contains descending order 
field
-------------------------------------+-------------------------------------
     Reporter:  Federico Bond        |                     Type:  Bug
       Status:  new                  |                Component:  Database
                                     |  layer (models, ORM)
      Version:  6.0                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 When a model has an index defined like this:

 {{{
 class Meta:
     indexes = [models.Index(fields=["foo", "-bar"])]
 }}}

 The system check framework in 6.0a1 will now report the following error:


 {{{
 foo.FooModel: (models.E012) 'indexes' refers to the nonexistent field
 '-bar'.
 }}}

 Tested with Django 6.0a1. This was not happening in 5.2. Might have
 something to do with these
 
[https://github.com/django/django/commit/8638d8bf74c1a58302c97d4436ad2eb08438145b
 changes] but I'm not sure.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36660>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070199d8f7066b-a8500926-4d17-4265-baf0-b39dc84c2447-000000%40eu-central-1.amazonses.com.

Reply via email to