#12524: Bad formatting on dates in JSON serializer causes ValidationError in
loaddata
---------------------------+------------------------------------------------
Reporter: gsf | Owner: nobody
Status: new | Milestone:
Component: Serialization | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 1 |
---------------------------+------------------------------------------------
Using SQLite I saw the following error when doing a loaddata on a fixture
I had just dumped out:
{{{
ValidationError: [u'Enter a valid date/time in YYYY-MM-DD
HH:MM[:ss[.uuuuuu]] format.']
}}}
Some poking around revealed some dates in my database were set to
"0001-01-01", but in the fixture they had been serialized as " 1-01-01".
The attached patch to the datetime_safe util fixed the issue, allowing me
to load the data back in, weird dates and all.
--
Ticket URL: <http://code.djangoproject.com/ticket/12524>
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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.