appy.gen: bugfix while indexing empty string values: bugfix while accessing object from a query without security enabled.

This commit is contained in:
Gaetan Delannay 2011-02-22 14:16:42 +01:00
parent 312b1f4cef
commit 3fc5bc8418
2 changed files with 7 additions and 1 deletions

View file

@ -362,7 +362,9 @@ class AbstractWrapper:
for brain in self.tool.o.executeQuery(contentType, search=search, \
brainsOnly=True, maxResults=maxResults, noSecurity=noSecurity):
# Get the Appy object from the brain
obj = brain.getObject().appy()
if noSecurity: method = '_unrestrictedGetObject'
else: method = 'getObject'
exec 'obj = brain.%s().appy()' % method
exec expression
return ctx