diff --git a/dynamic_rest/filters.py b/dynamic_rest/filters.py index 8ceffec4..50829d56 100644 --- a/dynamic_rest/filters.py +++ b/dynamic_rest/filters.py @@ -7,7 +7,7 @@ from functools import reduce from rest_framework import serializers from rest_framework.exceptions import ValidationError -from rest_framework.fields import BooleanField, NullBooleanField +from rest_framework.fields import BooleanField from rest_framework.filters import BaseFilterBackend, OrderingFilter from dynamic_rest.utils import is_truthy @@ -148,7 +148,7 @@ def rewrite_filters(fs, serializer): out = {} for node in fs.values(): filter_key, field = node.generate_query_key(serializer) - if isinstance(field, (BooleanField, NullBooleanField)): + if isinstance(field, BooleanField): node.value = is_truthy(node.value) out[filter_key] = node.value diff --git a/install_requires.txt b/install_requires.txt index f4417505..e3cde891 100644 --- a/install_requires.txt +++ b/install_requires.txt @@ -1,5 +1,5 @@ -Django>=2.2,<4.2 -djangorestframework>=3.11.2,<3.15 +Django>=2.2,<4.3 +djangorestframework>=3.14.0,<3.15 inflection>=0.4.0 requests hashids>=1.3.1 diff --git a/requirements.benchmark.txt b/requirements.benchmark.txt index 8dc0c1f5..92ac0c40 100644 --- a/requirements.benchmark.txt +++ b/requirements.benchmark.txt @@ -1,7 +1,7 @@ dj-database-url==0.3.0 -django-debug-toolbar==1.7 -Django>=2.2,<4.2 -djangorestframework>=3.11.2,<3.15 +django-debug-toolbar==1.11.1 +Django>=2.2,<4.3 +djangorestframework>=3.14.0,<3.15 djay>=0.0.9 flake8>=3.0 psycopg2-binary==2.9.3 diff --git a/tox.ini b/tox.ini index 2e668ba1..94e7e0b0 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ addopts=--tb=short [tox] envlist = py310-lint, - {py37,py38,py39,py310}-django{22,31,32,40,41}-drf{311,312,313,314}, + {py37,py38,py39,py310}-django{22,31,32,40,41,42}-drf{311,312,313,314}, [testenv] commands = ./runtests.py --fast {posargs} --coverage -rw @@ -16,6 +16,7 @@ deps = django32: Django>=3.2,<3.3 django40: Django>=4.0,<4.1 django41: Django>=4.1,<4.2 + django42: Django>=4.2,<4.3 drf311: djangorestframework>=3.11.2,<3.12 drf312: djangorestframework>=3.12,<3.13 drf313: djangorestframework>=3.13,<3.14 @@ -29,6 +30,6 @@ deps = -rrequirements.txt [testenv:py310-drf314-benchmarks] commands = ./runtests.py --benchmarks deps = - Django==4.1.1 + Django>=4.2,<4.3 djangorestframework==3.14 -rrequirements.benchmark.txt