summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Rominger <arominge@redhat.com>2024-04-25 21:37:08 +0200
committerGitHub <noreply@github.com>2024-04-25 21:37:08 +0200
commit014534bfa515640f7d89d888f13bed073f787018 (patch)
treee0d38fbe2e82fc0cc328e430412aeace1397cc90
parentTemporarily downgrade openssl (#15142) (diff)
downloadawx-014534bfa515640f7d89d888f13bed073f787018.tar.xz
awx-014534bfa515640f7d89d888f13bed073f787018.zip
Upgrade DRF (#15144)
* Upgrade DRF * Fix failures caused by DRF upgrade
-rw-r--r--awx/conf/fields.py6
-rw-r--r--requirements/requirements.in2
-rw-r--r--requirements/requirements.txt3
3 files changed, 8 insertions, 3 deletions
diff --git a/awx/conf/fields.py b/awx/conf/fields.py
index fee4573745..f25b722ece 100644
--- a/awx/conf/fields.py
+++ b/awx/conf/fields.py
@@ -61,6 +61,10 @@ class StringListBooleanField(ListField):
def to_representation(self, value):
try:
+ if isinstance(value, str):
+ # https://github.com/encode/django-rest-framework/commit/a180bde0fd965915718b070932418cabc831cee1
+ # DRF changed truthy and falsy lists to be capitalized
+ value = value.lower()
if isinstance(value, (list, tuple)):
return super(StringListBooleanField, self).to_representation(value)
elif value in BooleanField.TRUE_VALUES:
@@ -78,6 +82,8 @@ class StringListBooleanField(ListField):
def to_internal_value(self, data):
try:
+ if isinstance(data, str):
+ data = data.lower()
if isinstance(data, (list, tuple)):
return super(StringListBooleanField, self).to_internal_value(data)
elif data in BooleanField.TRUE_VALUES:
diff --git a/requirements/requirements.in b/requirements/requirements.in
index ed14141eb9..87cdd3367a 100644
--- a/requirements/requirements.in
+++ b/requirements/requirements.in
@@ -25,7 +25,7 @@ django-pglocks
django-radius
django-solo
django-split-settings==1.0.0 # We hit a strange issue where the release process errored when upgrading past 1.0.0 see UPGRADE BLOCKERS
-djangorestframework
+djangorestframework>=3.15.0
djangorestframework-yaml
filelock
GitPython>=3.1.37 # CVE-2023-41040
diff --git a/requirements/requirements.txt b/requirements/requirements.txt
index 3885188773..205a2899fc 100644
--- a/requirements/requirements.txt
+++ b/requirements/requirements.txt
@@ -167,7 +167,7 @@ django-split-settings==1.0.0
# via
# -r /awx_devel/requirements/requirements.in
# django-ansible-base
-djangorestframework==3.14.0
+djangorestframework==3.15.1
# via
# -r /awx_devel/requirements/requirements.in
# django-ansible-base
@@ -387,7 +387,6 @@ python3-openid==3.2.0
# via -r /awx_devel/requirements/requirements_git.txt
pytz==2024.1
# via
- # djangorestframework
# irc
# tempora
pyyaml==6.0.1