database specific checks in deserialization

54 views
Skip to first unread message

Riccardo Magliocchetti

unread,
May 12, 2014, 7:15:30 AM5/12/14
to django-d...@googlegroups.com
Hello,

as of 1.6.x loading fixtures with a blank=True IpAddressField field
dumped from a db that allows empty string would fail on postgresql
because its specialized field inet does not allow empty strings.

This issue has been reported in #6233 [1] that have been closed as
duplicate of #5622 [2] which has been closed as wontfix because of
https://code.djangoproject.com/ticket/5622#comment:61

So while one can fix the data with a sed one liner, still it would be
handy to have django handle the situation gtracefully. So would be
possibile to add database specific checks to loadata or somewhere upper
in the chain as serializers.deserialize?

thanks in advance,
riccardo

[1] https://code.djangoproject.com/ticket/6233
[2] https://code.djangoproject.com/ticket/5622
Reply all
Reply to author
Forward
0 new messages