1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Removed unneeded values in NullBooleanField.formfield().

These values are duplicated in the super().
This commit is contained in:
Tim Graham 2016-12-19 18:58:44 -05:00
parent c27104a9c7
commit 09a7f121b5

View File

@ -2041,11 +2041,7 @@ class NullBooleanField(Field):
return self.to_python(value)
def formfield(self, **kwargs):
defaults = {
'form_class': forms.NullBooleanField,
'required': not self.blank,
'label': capfirst(self.verbose_name),
'help_text': self.help_text}
defaults = {'form_class': forms.NullBooleanField}
defaults.update(kwargs)
return super(NullBooleanField, self).formfield(**defaults)