LadonTypes can't be nulled

Bug #926442 reported by jsgaarde
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ladon
Fix Committed
High
jsgaarde

Bug Description

I have this ladon complex types: http://pastebin.com/50mgbKGm
There are three classes: Customer, Contact, ContactType

Customer has many Contacts.
Contact is mebmer of one ContactType.

Then I send this SOAP request: http://pastebin.com/zMT7HYAH
Please focus on this line, contactType is empty(NULL): <contactType xsi:nil="true" xsi:type="ns1:ContactType"/>

I log values of ContactType attributes (ID, Name) on the server side and this is result:
INFO:ID:{'doc': 'ID of contact type', 'type': <class 'int'>, 'nullable': True}
INFO:Name:{'doc': 'Name of contact type', 'type': <class 'str'>, 'nullable': True}

I believe that when I put this object back in response, so the dispatcher will interpret these values as NULLs. But I need work with these attributes on the server. Eg. insert new ContactType into database and this is not possible.

Changed in ladon:
assignee: nobody → jsgaarde (jakob-simon-gaarde)
importance: Undecided → High
Revision history for this message
jsgaarde (jakob-simon-gaarde) wrote :

LadonType attributes that are None or untouched with no default value, will have the attribute xsi:nil set.

The test service I used to fix the bug can be found here:

http://bazaar.launchpad.net/~ladon-dev-team/ladon/ladon/files/head:/frameworks/python/support/bugs/926442/

Changed in ladon:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.