[ITree] small fixes: parent_entity is a IBreadCrumbs method, we should use .parent on ITree
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 02 Jul 2010 17:50:31 +0200
changeset 5871 b21eb3e90a10
parent 5870 d3ec7c4bb373
child 5872 137be4487ade
[ITree] small fixes: parent_entity is a IBreadCrumbs method, we should use .parent on ITree
interfaces.py
web/views/treeview.py
--- a/interfaces.py	Fri Jul 02 17:49:23 2010 +0200
+++ b/interfaces.py	Fri Jul 02 17:50:31 2010 +0200
@@ -98,7 +98,7 @@
     def embeded_url(self):
         """embed action interface"""
 
-# XXX deprecates in favor of ICalendarAdapter
+# XXX deprecates in favor of ICalendarableAdapter
 class ICalendarViews(Interface):
     """calendar views interface"""
     def matching_dates(self, begin, end):
--- a/web/views/treeview.py	Fri Jul 02 17:49:23 2010 +0200
+++ b/web/views/treeview.py	Fri Jul 02 17:50:31 2010 +0200
@@ -91,7 +91,7 @@
             # entity is actually an error message
             self.w(u'<span class="badcontent">%s</span>' % entity)
             return
-        parent = entity.cw_adapt_to('ITree').parent_entity()
+        parent = entity.cw_adapt_to('ITree').parent()
         if parent:
             parent.view(self.__regid__, w=self.w, done=done)
             self.w(self.separator)