Comment 1 for bug 474522

Revision history for this message
Leonard Richardson (leonardr) wrote :

This launchpadlib code will reproduce:

bug = launchpad.bugs[40000]
bug.owner = 42
bug.lp_save()

The problem is not that the object is None, but that it's not a string. Since only a string can be a valid URI, checking the type in the marshaller seems like a good way to solve the problem.

If you try to set a string field to a number, you 400 Bad Request and this error:

name: got 'int', expected unicode: 44

I'm not sure why that behavior isn't inherited.