[gen] Calendar field: added the notion of layer.

This commit is contained in:
Gaetan Delannay 2015-03-24 16:40:48 +01:00
parent be159b33be
commit def1b6ab70
5 changed files with 160 additions and 43 deletions

View file

@ -39,7 +39,8 @@ class BaseMixin:
* initiator is the initiator (Zope or Appy) object;
* field is the Ref instance.
'''
rq = self.REQUEST
rq = getattr(self, 'REQUEST', None)
if not rq: return None, None
if not rq.get('nav', '').startswith('ref.'): return None, None
splitted = rq['nav'].split('.')
initiator = self.getTool().getObject(splitted[1])