#34721: ChoiceField/TypedChoiceField: .value() has inconsistent behaviour, 
coercion
not applied.
------------------------+--------------------------------------
     Reporter:  Daniel  |                    Owner:  nobody
         Type:  Bug     |                   Status:  closed
    Component:  Forms   |                  Version:  4.2
     Severity:  Normal  |               Resolution:  worksforme
     Keywords:          |             Triage Stage:  Unreviewed
    Has patch:  0       |      Needs documentation:  0
  Needs tests:  0       |  Patch needs improvement:  0
Easy pickings:  0       |                    UI/UX:  0
------------------------+--------------------------------------
Changes (by Natalia Bidart):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 Hello,

 From my initial testing, and using as a base the code you shared, the
 template shows the expected behavior: when `request.POST` is empty, then
 data is `None` and I see `Red` as selected which is the default. If I hard
 code `data` to be, for example, `{"colour": 3}`, I see `Yellow` as
 selected.

 Because of the above, the best place to get answers to your issue is using
 any of the user support channels from
 [https://docs.djangoproject.com/en/dev/faq/help/#how-do-i-do-x-why-
 doesn-t-y-work-where-can-i-go-to-get-help this link]. Since the goal of
 this issue tracker is to track issues about Django itself, and your issue
 seems, at first, to be located in your custom code, I'll be closing this
 ticket as invalid.

 If, after debugging, you find out that this is indeed a bug in Django,
 please re-open with the specific details.

 Thank you!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34721#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/010701896a5022d9-11ebaddc-8d26-43d9-a342-bdd7ba8c9fda-000000%40eu-central-1.amazonses.com.

Reply via email to