#30902: The value of a TextChoices/IntegerChoices field has a differing type
-------------------------------------+-------------------------------------
     Reporter:  NyanKiyoshi          |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:  enum                 |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * cc: Nick Pope (added)
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Hi NyanKiyoshi, what a lovely report. Thank you.

 **Clearly** :) the expected behaviour is that `test_created_object_is_str`
 should pass.

 It's interesting that the underlying `__dict__` values differ, which
 explains all I guess:

 Created: `{'_state': <django.db.models.base.ModelState object at
 0x10730efd0>, 'id': 1, 'my_str_value': <MyChoice.FIRST_CHOICE: 'first'>}`
 Retrieved: `{'_state': <django.db.models.base.ModelState object at
 0x1072b5eb8>, 'id': 1, 'my_str_value': 'first'}`

 Good catch. Thanks again.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30902#comment:1>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/069.3b605e157b8f8d13d1323664fdbc73b8%40djangoproject.com.

Reply via email to