#34711: form.has_changed() is always True for IntegerChoices Enum Model Field
------------------------+--------------------------------------
Reporter: GHPS | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+--------------------------------------
Comment (by GHPS):
Update:
Setting **coerce=int** in TypeChoiceField works as well but seems to me a
rather crude way to treat
the original problem.
With this approach the developer is forced to remember the right field
type (TypeChoiceField) and
involved values (ints) to clamp a conversion mechanism hidden behind the
scene down to ground.
In both, the enum (IntegerChoice) and the model
(PositiveSmallIntegerField) the information is available
that we are dealing with integers. Perhaps this information can be
utilized to let ChoiceField do
the right thing without intervention...
--
Ticket URL: <https://code.djangoproject.com/ticket/34711#comment:8>
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/0107018963a2a492-e028a422-6ca7-4ef3-b31d-fd378dd02041-000000%40eu-central-1.amazonses.com.