diff --git a/tailbone/grids/core.py b/tailbone/grids/core.py index 3cbe274a..64547a5a 100644 --- a/tailbone/grids/core.py +++ b/tailbone/grids/core.py @@ -129,10 +129,13 @@ class Grid(object): def set_filter(self, key, *args, **kwargs): if len(args) == 1 and args[0] is None: - self.filters.pop(key, None) + self.remove_filter(key) else: self.filters[key] = self.make_filter(key, *args, **kwargs) + def remove_filter(self, key): + self.filters.pop(key, None) + def set_label(self, key, label): self.labels[key] = label if key in self.filters: