web/views/ibreadcrumbs.py
branchstable
changeset 6920 c41336a682ed
parent 6698 b353e868b74f
child 7101 de388d0b727e
equal deleted inserted replaced
6919:8fd6921f3e7c 6920:c41336a682ed
    50     """
    50     """
    51     __regid__ = 'IBreadCrumbs'
    51     __regid__ = 'IBreadCrumbs'
    52     __select__ = is_instance('Any', accept_none=False)
    52     __select__ = is_instance('Any', accept_none=False)
    53 
    53 
    54     def parent_entity(self):
    54     def parent_entity(self):
    55         if hasattr(self.entity, 'parent'):
    55         if hasattr(self.entity, 'parent') and callable(self.entity.parent):
    56             warn('[3.9] parent() method is deprecated, define a '
    56             warn('[3.9] parent() method is deprecated, define a '
    57                  'custom IBreadCrumbsAdapter/ITreeAdapter for %s instead'
    57                  'custom IBreadCrumbsAdapter/ITreeAdapter for %s instead'
    58                  % self.entity.__class__, DeprecationWarning)
    58                  % self.entity.__class__, DeprecationWarning)
    59             return self.entity.parent()
    59             return self.entity.parent()
    60         itree = self.entity.cw_adapt_to('ITree')
    60         itree = self.entity.cw_adapt_to('ITree')