Webservice treats named operation arguments as the wrong type

Bug #304670 reported by William Grant
10
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Leonard Richardson

Bug Description

Webservice named operations have their arguments mistreated. I discovered this with IDistribution.getSeries() - with name_or_version='8.10' it OOPSes with a NotFoundError like 1068S27, which I hear tries to call getSeries('8.1').

I can also ask for Ubuntu 8.0399999999999991 using IDistribution.getSeries(), and it will give me Ubuntu 8.04.

IProductSeries.addRelease() has the same problem, so it's not isolated to any one method.

Changed in launchpad-foundations:
assignee: nobody → leonardr
importance: Undecided → High
milestone: none → 2.1.12
status: New → Triaged
Revision history for this message
Leonard Richardson (leonardr) wrote :

The problem is caused on the server side where name_or_version is deserialized as a JSON object. TextField fields in query data shouldn't be JSON deserialized; they should just be treated as strings.

A workaround: quote '8.10' as '"8.10"'. Then it'll get deserialized into a string.

Changed in launchpad-foundations:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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