[patch] XML Deserializer does not handle None values in Foreign Keys
|Reported by:||andrew@…||Owned by:||adrian|
|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)
Changed 7 years ago by andrew@…
comment:1 Changed 7 years ago by andrew@…
- Summary changed from XML Deserializer does not handle None values in Foreign Keys to [patch] XML Deserializer does not handle None values in Foreign Keys