Skip to content

Commit

Permalink
Fix handling of range filters (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Apr 14, 2021
1 parent b40cb98 commit d84045a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lumen/filters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def __init__(self, **params):
if isinstance(self.widget, pn.widgets.Select) and self.empty_select:
self.widget.options.insert(0, ' ')
self.widget.value = ' '
self.widget.name = self.label
self.widget.link(self, value='value')
if self.default is not None:
self.widget.value = self.default
Expand All @@ -194,7 +195,9 @@ def query(self):
if not hasattr(self.widget.param.value, 'serialize') or self.widget.value is None:
return self.widget.value
else:
return self.widget.param.value.serialize(self.widget.value)
value = self.widget.param.value.serialize(self.widget.value)
if isinstance(value, list) and isinstance(self.widget.value, tuple):
return self.widget.value

@property
def panel(self):
Expand Down

0 comments on commit d84045a

Please sign in to comment.