#26609: Add system check for field choices using unorderable iterables
-------------------------------------+-------------------------------------
     Reporter:  Harry Percival       |                    Owner:  Karl
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  migrations           |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Karl):

 I'm cool with just adding to `E004`.

 However, I've run into a new issue that I haven't been able to identify.

 My test works if the field uses a set like `{1,2}`, but not if it is a set
 of tuples like `{("a","A"), ("b","B")}`. If I type check right before
 actually doing the test it is somehow identified as a `list`. It seems
 that Django is doing some work on the value of `choices` before it does
 the check? Anyone know what's going on there?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/26609#comment:13>
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/01070192ba8260a7-6bb732cd-a418-451a-89bc-0611fd37b58e-000000%40eu-central-1.amazonses.com.

Reply via email to