[Zope3-Users] WrongContainedType
Tim Cook
timothywayne.cook at gmail.com
Fri Oct 10 15:31:59 EDT 2008
On Fri, 2008-10-10 at 21:17 +0200, Roger Ineichen wrote:
> I do not fully understand what the codes does but this does not work:
>
> ontObj.parentArchetype = ''
>
> Because it will set an empty string but an IObjectRef is needed.
> Thats' not valid, just let it be, don't set anything else then
> an IObjectRef as value.
>
Unfortuuately you are looking at older code (before I really began
testing this section).
The code that is failing is:
oid = ObjectId(unicode(parsed_adl.archetype[1]))
ontObj.parentArchetype = ObjectRef(oid,u'openehr',u'ARCHETYPE')
where oid is an instance of ObjectId.
Sorry that the servers are down right now and will be all weekend.
> Also this doesn't work:
...
>
>
> In the sample above just remove the else condition.
> The object whould return an empty list as defined
> in default anyway.
>
Okay.
> btw,
> I really dislike this invalid schema definitions. With
> invalid I mean the default value is not a vaild value
> if ou try to store them.
>
> because of:
>
> required=True
> default=[]
>
> This is a combination which is not valid and it's not possible
> to store the default value again.
Thanks. This is so obvious now that you pointed it out. :-)
I'll look around for more of these.
Thanks and have a great weekend.
I'll be busy Grokifying this application.
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*
**************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20081010/b9ca947c/attachment.bin
More information about the Zope3-users
mailing list