#30902: The value of a TextChoices/IntegerChoices field has a differing type
-------------------------------------+-------------------------------------
Reporter: NyanKiyoshi | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: enum | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Shai Berger):
* cc: Shai Berger (added)
* needs_better_patch: 0 => 1
Comment:
This issue only arises if one explicitly calls `str()` on the enum value.
Otherwise, as the supplied test shows, the value is an instance of `str`.
As such, it serializes e.g. to JSON correctly with `json.dumps()`, so I
don't see an issue with external APIs either.
There's deeper discussion in the PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/30902#comment:4>
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.2cc36df7aa002b2f87228b143ec1332d%40djangoproject.com.