[patch] XML Deserializer does not handle None values in Foreign Keys
|Reported by:||Owned by:||Adrian Holovaty|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Although the XML Serializer handle_fk_field method goes out of its way to create a 'None' element if the foreign key relation is None, the Deserializer fails to handle the case.
Example: In a Model with a self-referential Foreign key which is allowed to be blank (and null), you may have entries with a blank value. This gets mapped to the 'None' element over the wire and results in an exception when the system attempts to find the related key with primary key , since the None element contains no text.
Change History (3)
comment:1 Changed 11 years ago by
|Summary:||XML Deserializer does not handle None values in Foreign Keys → [patch] XML Deserializer does not handle None values in Foreign Keys|