Skip to content

Commit 84e2440

Browse files
committed
Don't add empty form to AdvancedFilterFormSet.forms
We should still be able to use empty_form fields in javascript, via the InlineAdminFormSet helper
1 parent b923e72 commit 84e2440

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

advanced_filters/forms.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,6 @@ def get_form_kwargs(self, index):
200200
kwargs['model_fields'] = self.model_fields
201201
return kwargs
202202

203-
@cached_property
204-
def forms(self):
205-
# override the original property to include `model_fields` argument
206-
forms = [self._construct_form(i, model_fields=self.model_fields)
207-
for i in range(self.total_form_count())]
208-
forms.append(self.empty_form) # add initial empty form
209-
return forms
210-
211203

212204
AFQFormSet = formset_factory(
213205
AdvancedFilterQueryForm, formset=AdvancedFilterFormSet,

0 commit comments

Comments
 (0)