# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1232391461 -3600 # Node ID 3a3ab6bbccc5f40db14d05f0092f5f64de83a729 # Parent 18cc518d5e33e6c57ca078d0abf1487ec4f91c94 use empty string instead of None as possible context value to avoid getting an tag in associated widget diff -r 18cc518d5e33 -r 3a3ab6bbccc5 common/selectors.py --- a/common/selectors.py Mon Jan 19 19:46:33 2009 +0100 +++ b/common/selectors.py Mon Jan 19 19:57:41 2009 +0100 @@ -499,7 +499,7 @@ propval = req.property_value('%s.%s.context' % (cls.__registry__, cls.id)) if not propval: propval = cls.context - if context is not None and propval is not None and context != propval: + if context is not None and propval and context != propval: return 0 return 1 contextprop_selector = deprecated_function(match_context_prop) diff -r 18cc518d5e33 -r 3a3ab6bbccc5 web/facet.py --- a/web/facet.py Mon Jan 19 19:46:33 2009 +0100 +++ b/web/facet.py Mon Jan 19 19:57:41 2009 +0100 @@ -245,11 +245,11 @@ help=_('display order of the box')), _('context'): dict(type='String', default=None, # None <-> both - vocabulary=(_('tablefilter'), _('facetbox'), None), + vocabulary=(_('tablefilter'), _('facetbox'), ''), help=_('context where this box should be displayed')), } visible = True - context = None + context = '' needs_update = False start_unfolded = True