Skip to content

Commit 62516ad

Browse files
author
Ryan P Kilby
committed
Remove duplicate loop
1 parent da3ed3b commit 62516ad

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

django_filters/filterset.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from django.db.models.constants import LOOKUP_SEP
1111
from django.db.models.fields.related import ForeignObjectRel
1212
from django.utils import six
13-
from django.utils.translation import ugettext as _
1413

1514
from .conf import settings
1615
from .compat import remote_field, remote_queryset
@@ -235,12 +234,10 @@ def __init__(self, data=None, queryset=None, prefix=None, strict=None, request=N
235234
self.request = request
236235

237236
self.filters = copy.deepcopy(self.base_filters)
238-
# propagate the model being used through the filters
237+
239238
for filter_ in self.filters.values():
239+
# propagate the model and filterset to the filters
240240
filter_.model = self._meta.model
241-
242-
# Apply the parent to the filters, this will allow the filters to access the filterset
243-
for filter_key, filter_ in six.iteritems(self.filters):
244241
filter_.parent = self
245242

246243
@property

0 commit comments

Comments
 (0)