diff -r d11d88bd08e8 -r 09ffcc04bd21 rset.py --- a/rset.py Thu May 19 09:40:44 2011 +0200 +++ b/rset.py Thu May 19 09:43:23 2011 +0200 @@ -1,4 +1,4 @@ -# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of CubicWeb. @@ -79,7 +79,7 @@ rows = rows[:10] + ['...'] if len(rows) > 1: # add a line break before first entity if more that one. - pattern = '' + pattern = '' else: pattern = '' @@ -673,8 +673,12 @@ root = rootselect.parent selectmain = select.selection[selectidx] for i, term in enumerate(rootselect.selection): - rootvar = _get_variable(term) - if rootvar is None: + try: + # don't use _get_variable here: if the term isn't a variable + # (function...), we don't want it to be used as an entity attribute + # or relation's value (XXX beside MAX/MIN trick?) + rootvar = term.variable + except AttributeError: continue if rootvar.name == rootmainvar.name: continue