#11486: There are no way to provide empty (or null/None) "pk" for XML serialized object to deserialized ------------------------------------+--------------------------------------- Reporter: zdmytriv | Owner: nobody Status: new | Milestone: 1.0.3 Component: Serialization | Version: 1.0 Resolution: | Keywords: xml, deserialization Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 1 Needs_better_patch: 1 | ------------------------------------+--------------------------------------- Changes (by russellm):
* needs_better_patch: 0 => 1 * needs_tests: 0 => 1 * stage: Unreviewed => Accepted Comment: This is an interesting omission from the XML serializer. However, your proposed solution won't work - what happens when you have an object with a string primary key and you want to use a primary key value of "None"? Using this approach, there is no difference between pk=None and pk="None". In this case, I suspect the right approach is to change the parser so that the pk attribute isn't mandatory, and then interpret the absence of the pk attribute as a null PK value. From a procedural point of view, any patch would also require tests before it would be accepted for trunk. -- Ticket URL: <http://code.djangoproject.com/ticket/11486#comment:2> 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-updates@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 -~----------~----~----~----~------~----~------~--~---