Fix use of Widget.build_attrs in TriStateCheckbox
Signature changed in Django 1.11.
This commit is contained in:
parent
8675948d9e
commit
ce73499077
1 changed files with 2 additions and 1 deletions
|
@ -20,6 +20,7 @@ class TriStateCheckbox(Widget):
|
||||||
def render(self, name, value, attrs=None, choices=()):
|
def render(self, name, value, attrs=None, choices=()):
|
||||||
if value is None:
|
if value is None:
|
||||||
value = 'none'
|
value = 'none'
|
||||||
final_attrs = self.build_attrs(attrs, value=value)
|
attrs['value'] = value
|
||||||
|
final_attrs = self.build_attrs(self.attrs, attrs)
|
||||||
output = ["<span class=\"tristate\"%s></span>" % flatatt(final_attrs)]
|
output = ["<span class=\"tristate\"%s></span>" % flatatt(final_attrs)]
|
||||||
return mark_safe('\n'.join(output))
|
return mark_safe('\n'.join(output))
|
||||||
|
|
Loading…
Reference in a new issue