Fixes: CaseInsensitiveListFilter debugs
This commit is contained in:
parent
1134fdf90a
commit
1804d26738
1 changed files with 5 additions and 0 deletions
|
|
@ -24,14 +24,19 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
class CaseInsensitiveListFilter(BaseInFilter, CharFilter):
|
||||
def filter(self, qs, value):
|
||||
logger.debug("CaseInsensitiveListFilter got value: %s", value)
|
||||
if not value:
|
||||
return qs
|
||||
|
||||
values = []
|
||||
|
||||
if isinstance(value, str):
|
||||
values = [v.strip() for v in value.split(',') if v.strip()]
|
||||
else:
|
||||
values = [v for v in value if v]
|
||||
|
||||
logger.debug("CaseInsensitiveListFilter value splitted: %s", values)
|
||||
|
||||
if not values:
|
||||
return qs
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue