[CPS-devel] Re: context not available in read expression for creation of documents

Yves Bastide ybastide at wanadoo.fr
Wed Jun 14 21:08:24 CEST 2006


JoseLuis de la Rosa Triviño wrote:
> 
> I'm using this expression 
> {{{python:context.portal_directories.members[context.aq_parent.getId()].center}}} 
> as "Read: Expression" for a schema field. It works fine when the 
> document is already created, but when I create a new content an 
> exception is raised because context is None and it can't get 
> portal_directories.
[...]
> 
> The question is: what can I use instead of context to get that field 
> from members entry?

What's your expression returning?  Can it use user?  The namespace is 
defined in CPSSchemas.Field._createStorageExpressionContext, I think.

yves



More information about the cps-devel mailing list

This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.