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
1 changed files with 1 additions and 5 deletions

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)