[sorted navigation] refactor code so that when an attribute is found, nb_chars may be recomputed anyway according to variable type
--- a/web/views/navigation.py Thu Nov 24 16:59:32 2011 +0100
+++ b/web/views/navigation.py Thu Nov 24 17:00:09 2011 +0100
@@ -231,10 +231,11 @@
relvar = rel.children[0].variable
col = relvar.selected_index()
if col is not None:
- return col, attrname
- # no relation but maybe usable anyway if selected
- col = var.selected_index()
- attrname = None
+ break
+ else:
+ # no relation but maybe usable anyway if selected
+ col = var.selected_index()
+ attrname = None
if col is not None:
# if column type is date[time], set proper 'nb_chars'
if var.stinfo['possibletypes'] & frozenset(('TZDatetime', 'Datetime',