body is not convert into a wsme types is some case

Bug #1233219 reported by Mehdi Abaakouk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
WSME
Fix Released
Undecided
Mehdi Abaakouk

Bug Description

Hi,

class MeterController(rest.RestController):
    @expose([Sample], body=[Sample])
    def post(self, body):
           assert type(body[0], Sample)

In this case the body is a list of dict or it should be a list of Sample.

Cheers,

Mehdi Abaakouk (sileht)
Changed in wsme:
assignee: nobody → Mehdi Abaakouk (sileht)
Revision history for this message
Christophe de Vienne (cdevienne) wrote :

Hi,

It should be a list of Sample. What do you get ?

Cheers

PS: If you have general purpose questions about wsme you should use the mailing list (https://groups.google.com/forum/#!forum/python-wsme)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to wsme (master)

Fix proposed to branch: master
Review: https://review.openstack.org/48995

Changed in wsme:
status: New → In Progress
Revision history for this message
Mehdi Abaakouk (sileht) wrote :

This is not a question this is a fact I get a list of dict :)

(note: Sample is a custom UserType in my case.)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to wsme (master)

Reviewed: https://review.openstack.org/48995
Committed: http://github.com/stackforge/wsme/commit/664c214dbf2dd33e8fd6a78ca828c02bb1a91c1c
Submitter: Jenkins
Branch: master

commit 664c214dbf2dd33e8fd6a78ca828c02bb1a91c1c
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Sep 30 17:33:57 2013 +0200

    Handle [] {} for body in rest protocols

    This change allow to use [] or {} for the definition of the body in rest
    protocols.

    Fixes bug #1233219

    Change-Id: Ib96f0487dd7d78bd657f6d4b3facbd8b611f8702

Changed in wsme:
status: In Progress → Fix Committed
Changed in wsme:
milestone: none → 0.8.0
status: Fix Committed → Fix Released
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.