Here's what I do:

self.invokeFactory( 'SampleType', id='test_id', file=buf.getvalue() )

buf is an StringIO object.

When I call this as admin the file field is populated.
When I call this as anoymous the object is still created, but the file field
is not filled.

I'm qiute sure the problem takes place in invokeFactory.

Currently my work-around consists of:

self.invokeFactory( 'SampleType', id='test_id')
self['test_id'].getField('file').set( self['test_id'], buf.getvalue() )

Is this behavior expected or should I (or someone else more knowledgeable)
post this as an issue?


-- 
View this message in context: 
http://www.nabble.com/Odd-invokeFactory-behaviour-tp14751225s20094p14751225.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to