Used 'nav' request param instead of session for storing info about the initiator of an object creation.

This commit is contained in:
Gaetan Delannay 2010-09-19 15:04:44 +02:00
parent c2a3551a94
commit 7c2b8fed11
5 changed files with 46 additions and 44 deletions

View file

@ -31,8 +31,9 @@ class ToolWrapper(AbstractWrapper):
'''Retrieves the object that triggered the creation of the object
being currently created (if any).'''
res = None
initiatorUid = self.session['initiator']
if initiatorUid:
rq = self.o.REQUEST
if rq.get('nav', ''):
initiatorUid = rq['nav'].split('.')[1]
res = self.o.uid_catalog(UID=initiatorUid)[0].getObject().appy()
return res