Hi group,

I cannot figure out where the bug is. The Bool-validator seems to be
always evaluating to True.

JSON request sends these values:
    {'id': value, 'is_business': false})
In the controller, the validators are set this way:
    @tg.validate(validators={'id': validators.Int(),
                             'is_business': validators.Bool()})
    def add(id, is_business, tg_errors=None):
        print is_business
        ...

I expect that "False" is printed out, but "True" is it actually. The
same happens, if I let is_business be 0 in the JSON request -
interestingly, Bool.to_python(0) returns "False" on the command line.

Did I hit a bug?

Thanks in advance,
Mark


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to