#27595: ForeignKey to model subclass using UUID as primary key isn't populated
in
form's <select>
------------------------+------------------------------------
Reporter: oyooyo | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------
Changes (by Tim Graham):
* type: Uncategorized => Bug
* component: Uncategorized => Forms
* stage: Unreviewed => Accepted
Comment:
I can reproduce this at `eb7fb565e6483637fc4ee251940b86db813485a0` on
SQLite but not PostgreSQL -- I guess it's based on whether or not the
database has a native UUID type. On SQLite, for example, the initial form
data appears as `{'prototype': '35bba53ceafc4df2b1abc110d5f51b2a'}` but
the UUID values in the form's `<select>` have dashes, so there's a
mismatch. On PostgreSQL, the initial data is `{'prototype': UUID
('154e323f-cc57-4399-9023-58357ae9ce21')}` and there's no issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/27595#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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.3c2335bf0e14ed5e459c2a787656cded%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.