From 14f67746bf0d71ee6cfeb73bd0710ed9543ff931 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 18 Oct 2017 12:54:57 -0700 Subject: [PATCH] Allow passing `None` to `Grid.set_joiner()` doing so will remove the joiner --- tailbone/grids/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tailbone/grids/core.py b/tailbone/grids/core.py index 63ea83bd..4f79587b 100644 --- a/tailbone/grids/core.py +++ b/tailbone/grids/core.py @@ -115,7 +115,10 @@ class Grid(object): self.columns.remove(key) def set_joiner(self, key, joiner): - self.joiners[key] = joiner + if joiner is None: + self.joiners.pop(key, None) + else: + self.joiners[key] = joiner def set_sorter(self, key, *args, **kwargs): self.sorters[key] = self.make_sorter(*args, **kwargs)