saml: add missing **kwargs to method (#50747)

This commit is contained in:
Valentin Deniaud 2021-02-24 17:01:42 +01:00
parent 2089b889da
commit 0225be797c
1 changed files with 2 additions and 2 deletions

View File

@ -64,13 +64,13 @@ class TextAndFileWidget(forms.widgets.MultiWidget):
value = self.widgets[0].value_from_datadict(data, files, name + '_0')
return value
def render(self, name, value, attrs=None):
def render(self, name, value, attrs=None, **kwargs):
if attrs is None:
attrs = {}
if isinstance(value, (str, six.text_type)):
attrs['rows'] = value.count('\n') + 5
attrs['cols'] = min(max((len(x) for x in value.split('\n'))), 150)
return super(TextAndFileWidget, self).render(name, value, attrs)
return super(TextAndFileWidget, self).render(name, value, attrs, **kwargs)
class LibertyProviderForm(ModelForm):