--- a/web/facet.py Wed Jul 03 14:43:21 2013 +0200
+++ b/web/facet.py Wed Jul 03 14:48:34 2013 +0200
@@ -74,10 +74,11 @@
def rtype_facet_title(facet):
- ptypes = facet.cw_rset.column_types(0)
- if len(ptypes) == 1:
- return display_name(facet._cw, facet.rtype, form=facet.role,
- context=iter(ptypes).next())
+ if facet.cw_rset:
+ ptypes = facet.cw_rset.column_types(0)
+ if len(ptypes) == 1:
+ return display_name(facet._cw, facet.rtype, form=facet.role,
+ context=iter(ptypes).next())
return display_name(facet._cw, facet.rtype, form=facet.role)
def get_facet(req, facetid, select, filtered_variable):