[facets] fix RangeFacet get_widget: do no return a widget unless there are at least 2 values; closes #1625203
--- a/web/facet.py Fri Apr 22 12:20:48 2011 +0200
+++ b/web/facet.py Fri Apr 22 16:15:10 2011 +0200
@@ -936,7 +936,7 @@
"""return the widget instance to use to display this facet"""
values = set(value for _, value in self.vocabulary() if value is not None)
# Rset with entities (the facet is selected) but without values
- if len(values) == 0:
+ if len(values) < 2:
return None
return self.wdgclass(self, min(values), max(values))