[Zope3-Users] WrongContainedType

Roger Ineichen dev at projekt01.ch
Fri Oct 10 11:46:56 EDT 2008


Hi Tim

> Betreff: Re: [Zope3-Users] WrongContainedType
> 
> On Fri, 2008-10-10 at 11:07 +0200, Roger Ineichen wrote:
> 
> > What do you think about a validateSchema=True/False option or 
> > something like that?
> 
> Maybe it's just a requirement to fix the code?
> 
> The code at around line 466 in _field.py says
>         errors = _validate_fields(self.schema, value)
>         if errors:
>             raise WrongContainedType(errors)
> 
> errors is an empty list so should the if statement just be a 
> test to see if the list is not empty?

I guess not, normaly such an error has an empty representation
and the list is not empty. Try to do errors[0] or type(errors[0])
and you probably see something.

If not I'm confused

Regards
Roger Ineichen

> Cheers,
> Tim
> 
> 
> 
> 
> --
> Timothy Cook, MSc
> Health Informatics Research & Development Services LinkedIn 
> Profile:http://www.linkedin.com/in/timothywaynecook
> Skype ID == timothy.cook
> **************************************************************
> *You may get my Public GPG key from  popular keyservers or   *
> *from this link http://timothywayne.cook.googlepages.com/home*
> **************************************************************
> 



More information about the Zope3-users mailing list