From 8d087f9a179c287e5bb1e24558b097e0a761bc28 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Wed, 11 Dec 2019 06:15:12 -0800 Subject: [PATCH] Fixed typo in ModelChoiceFieldTests. The subindex and attrs arguments should be passed through to the parent, not overridden as None. --- tests/model_forms/test_modelchoicefield.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/model_forms/test_modelchoicefield.py b/tests/model_forms/test_modelchoicefield.py index 0591c425fe9..cecc7272674 100644 --- a/tests/model_forms/test_modelchoicefield.py +++ b/tests/model_forms/test_modelchoicefield.py @@ -275,7 +275,7 @@ class ModelChoiceFieldTests(TestCase): class CustomCheckboxSelectMultiple(CheckboxSelectMultiple): 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. c = value.obj option['attrs']['data-slug'] = c.slug