Skip to content

Commit

Permalink
fix(filters): don't pass self to super().__init__() call
Browse files Browse the repository at this point in the history
Don't know how this ever worked - self is passed implicitly, and
passing it again breaks the filter instance in very subtle ways
(but somehow still kept them working in most cases)
  • Loading branch information
David Vogt committed Oct 10, 2019
1 parent 08be491 commit 748c99d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caluma/form/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class HasAnswerFilter(Filter):

def __init__(self, *args, **kwargs):
self.document_id = kwargs.pop("document_id")
super().__init__(self, *args, **kwargs)
super().__init__(*args, **kwargs)

VALID_LOOKUPS = {
"text": [
Expand Down Expand Up @@ -242,7 +242,7 @@ class SearchAnswersFilter(Filter):

def __init__(self, *args, **kwargs):
self.document_id = kwargs.pop("document_id")
super().__init__(self, *args, **kwargs)
super().__init__(*args, **kwargs)

def filter(self, qs, value):
if value in EMPTY_VALUES:
Expand Down

0 comments on commit 748c99d

Please sign in to comment.