Allow passing None to Form.set_renderer()
i.e. to remove any renderer which has been set
This commit is contained in:
parent
f021df446c
commit
dfd43b55aa
|
@ -576,6 +576,10 @@ class Form(object):
|
|||
self.enums.pop(key, None)
|
||||
|
||||
def set_renderer(self, key, renderer):
|
||||
if renderer is None:
|
||||
if key in self.renderers:
|
||||
del self.renderers[key]
|
||||
else:
|
||||
self.renderers[key] = renderer
|
||||
|
||||
def set_widget(self, key, widget):
|
||||
|
|
Loading…
Reference in a new issue