Fix to handle changed Widget signature affecting picklefield in admin
This commit is contained in:
parent
4b9db9570c
commit
2c88963e3c
1 changed files with 7 additions and 1 deletions
|
|
@ -126,7 +126,13 @@ class PickledWidget(Textarea):
|
|||
except ValueError:
|
||||
return value
|
||||
|
||||
final_attrs = self.build_attrs(attrs, name=name)
|
||||
# fix since the signature of build_attrs changed in Django 1.11
|
||||
if attrs is not None:
|
||||
attrs["name"] = name
|
||||
else:
|
||||
attrs = {"name": name}
|
||||
|
||||
final_attrs = self.build_attrs(attrs)
|
||||
return format_html('<textarea{0}>\r\n{1}</textarea>',
|
||||
flatatt(final_attrs),
|
||||
value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue