#14438: Deserializer raises ValidationError if natural key is given as string
---------------------------+------------------------------------------------
Reporter: zimnyx | Owner: nobody
Status: new | Milestone:
Component: Serialization | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 0 |
---------------------------+------------------------------------------------
Command `manage.py dumpdata --natural --format=yaml` generates FK as
following:
{{{
fk_name: natural_key_value
}}}
for example
{{{
color: red
}}}
Such fixture gives ValidationError when trying to load:
{{{
ValidationError: [u'This value must be an integer.']
}}}
The workaround for this problem is put natural key in []:
{{{
fk_name: [natural_key_value]
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/14438>
Django <http://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.