appy.gen: added method wrapper.search1 that returns a single result (which is the only difference with wrapper.search); bugfix while getting objects from the catalog (bypass security when called from code).
This commit is contained in:
parent
cb53c6b9b2
commit
0b6d2d2165
5 changed files with 17 additions and 11 deletions
|
@ -206,7 +206,7 @@ class ToolMixin(BaseMixin):
|
|||
if not res: return
|
||||
res = res[0]
|
||||
if brain: return res
|
||||
res = res.getObject()
|
||||
res = res._unrestrictedGetObject()
|
||||
if not appy: return res
|
||||
return res.appy()
|
||||
|
||||
|
|
|
@ -846,9 +846,9 @@ class BaseMixin:
|
|||
self.appy().sort(fieldName, sortKey=sortKey, reverse=reverse)
|
||||
|
||||
def notifyWorkflowCreated(self):
|
||||
'''This method is called by Zope/CMF every time an object is created,
|
||||
be it temp or not. The objective here is to initialise workflow-
|
||||
related data on the object.'''
|
||||
'''This method is called every time an object is created, be it temp or
|
||||
not. The objective here is to initialise workflow-related data on
|
||||
the object.'''
|
||||
wf = self.getWorkflow()
|
||||
# Get the initial workflow state
|
||||
initialState = self.State(name=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue