equal
deleted
inserted
replaced
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') |