#18501: Custom fields as foreign keys fix
----------------------------------------------+--------------------------
Reporter: msopacua | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords: RelatedField
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------------
Custom fields which have a different database representation as python
representation are not handled correctly when rendered as Select fields.
The underlying cause is that the value on the model that has the foreign
key is the database representation and it is not converted to python
representation when model_to_dict is called.
The ForeignKey field subclasses RelatedField and Field, but RelatedField
does not override it's value_from_object method to convert the value to
python.
--
Ticket URL: <https://code.djangoproject.com/ticket/18501>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.