Fixed typo in ModelChoiceFieldTests.

The subindex and attrs arguments should be passed through to the parent,
not overridden as None.
This commit is contained in:
Jon Dufresne 2019-12-11 06:15:12 -08:00 committed by Carlton Gibson
parent 88637064b3
commit 8d087f9a17
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ class ModelChoiceFieldTests(TestCase):
class CustomCheckboxSelectMultiple(CheckboxSelectMultiple): class CustomCheckboxSelectMultiple(CheckboxSelectMultiple):
def create_option(self, name, value, label, selected, index, subindex=None, attrs=None): def create_option(self, name, value, label, selected, index, subindex=None, attrs=None):
option = super().create_option(name, value, label, selected, index, subindex=None, attrs=None) option = super().create_option(name, value, label, selected, index, subindex, attrs)
# Modify the HTML based on the object being rendered. # Modify the HTML based on the object being rendered.
c = value.obj c = value.obj
option['attrs']['data-slug'] = c.slug option['attrs']['data-slug'] = c.slug