#30774: Migrations uses value of enum object instead of its name.
----------------------------------+--------------------------------------
     Reporter:  oasl              |                    Owner:  nobody
         Type:  Bug               |                   Status:  closed
    Component:  Migrations        |                  Version:  master
     Severity:  Normal            |               Resolution:  needsinfo
     Keywords:  Enum, Migrations  |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Changes (by felixxm):

 * status:  new => closed
 * version:  2.2 => master
 * resolution:   => needsinfo


Comment:

 Thanks for this report, however I'm not sure how translated values can
 brake migrations. Can you provide a sample project to reproduce this
 issue? Migrations with translatable strings works fine for me:
 {{{
 >>> class TextEnum(enum.Enum):
 ...     C = _('translatable value')
 ...
 >>> TextEnum(_('translatable value'))
 <TextEnum.C: 'translatable value'>
 >>> TextEnum('translatable value')
 <TextEnum.C: 'translatable value'>
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30774#comment:2>
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/062.6f4f22de934c76d066b17001b45db80e%40djangoproject.com.

Reply via email to