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

Florent Guillaume fg at nuxeo.com
Thu Jun 15 01:10:25 CEST 2006


On 14 Jun 2006, at 21:08, Yves Bastide wrote:

> 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.
>

And documented in CPSShemas/doc/fields.txt (maybe not completely up  
to date).

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com





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.