diff -r aa04ccb8dd62 -r 0f2ded880d01 rset.py --- a/rset.py Mon Jun 07 12:39:15 2010 +0200 +++ b/rset.py Mon Jun 07 13:22:24 2010 +0200 @@ -15,9 +15,8 @@ # # You should have received a copy of the GNU Lesser General Public License along # with CubicWeb. If not, see . -"""The `ResultSet` class which is returned as result of an rql query +"""The `ResultSet` class which is returned as result of an rql query""" -""" __docformat__ = "restructuredtext en" from logilab.common.decorators import cached, clear_cache, copy_cache @@ -600,7 +599,11 @@ if rel is not None: index = rel.children[0].root_selection_index() if index is not None and self.rows[row][index]: - return self.get_entity(row, index), rel.r_type + try: + entity = self.get_entity(row, index) + return entity, rel.r_type + except NotAnEntity, exc: + return None, None return None, None @cached