Server fails to return a list of data claiming type mismatch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ladon |
New
|
Undecided
|
Unassigned |
Bug Description
Ladon functions which have a return type of an array of anything won't return data.
The following code:
class V1(object):
"""
This service returns events between two times for a given trackable.
"""
@ladonize(
def getGroupNames(
"""
Returns a list of group names.
@rtype: List of group names.
"""
cnn = db.get_connection()
sql = "blah blah sql"
params = {}
groups = db.execute_
ret = []
for g in groups:
ret += [g["group_
return ret
Gets the following error:
WebFault: Server raised fault: 'Return-type mismatch in V1::getGroupNames: Expected [<type 'unicode'>] recieved <type 'list'>'
It sees a list as a response, but won't accept it claiming it's not a list. (Or alternatively, it's expecting a list of unicode, and is failing on a list of unicode)