mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Upgrade DRF (#15144)
* Upgrade DRF * Fix failures caused by DRF upgrade
This commit is contained in:
@@ -61,6 +61,10 @@ class StringListBooleanField(ListField):
|
|||||||
|
|
||||||
def to_representation(self, value):
|
def to_representation(self, value):
|
||||||
try:
|
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)):
|
if isinstance(value, (list, tuple)):
|
||||||
return super(StringListBooleanField, self).to_representation(value)
|
return super(StringListBooleanField, self).to_representation(value)
|
||||||
elif value in BooleanField.TRUE_VALUES:
|
elif value in BooleanField.TRUE_VALUES:
|
||||||
@@ -78,6 +82,8 @@ class StringListBooleanField(ListField):
|
|||||||
|
|
||||||
def to_internal_value(self, data):
|
def to_internal_value(self, data):
|
||||||
try:
|
try:
|
||||||
|
if isinstance(data, str):
|
||||||
|
data = data.lower()
|
||||||
if isinstance(data, (list, tuple)):
|
if isinstance(data, (list, tuple)):
|
||||||
return super(StringListBooleanField, self).to_internal_value(data)
|
return super(StringListBooleanField, self).to_internal_value(data)
|
||||||
elif data in BooleanField.TRUE_VALUES:
|
elif data in BooleanField.TRUE_VALUES:
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ django-pglocks
|
|||||||
django-radius
|
django-radius
|
||||||
django-solo
|
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
|
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
|
djangorestframework-yaml
|
||||||
filelock
|
filelock
|
||||||
GitPython>=3.1.37 # CVE-2023-41040
|
GitPython>=3.1.37 # CVE-2023-41040
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ django-split-settings==1.0.0
|
|||||||
# via
|
# via
|
||||||
# -r /awx_devel/requirements/requirements.in
|
# -r /awx_devel/requirements/requirements.in
|
||||||
# django-ansible-base
|
# django-ansible-base
|
||||||
djangorestframework==3.14.0
|
djangorestframework==3.15.1
|
||||||
# via
|
# via
|
||||||
# -r /awx_devel/requirements/requirements.in
|
# -r /awx_devel/requirements/requirements.in
|
||||||
# django-ansible-base
|
# django-ansible-base
|
||||||
@@ -387,7 +387,6 @@ python3-openid==3.2.0
|
|||||||
# via -r /awx_devel/requirements/requirements_git.txt
|
# via -r /awx_devel/requirements/requirements_git.txt
|
||||||
pytz==2024.1
|
pytz==2024.1
|
||||||
# via
|
# via
|
||||||
# djangorestframework
|
|
||||||
# irc
|
# irc
|
||||||
# tempora
|
# tempora
|
||||||
pyyaml==6.0.1
|
pyyaml==6.0.1
|
||||||
|
|||||||
Reference in New Issue
Block a user