mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 05:47:38 -02:30
Fix issue when string list settings field is null. Resolves #3683.
This commit is contained in:
@@ -20,8 +20,14 @@ logger = logging.getLogger('awx.conf.fields')
|
|||||||
|
|
||||||
|
|
||||||
class StringListField(ListField):
|
class StringListField(ListField):
|
||||||
|
|
||||||
child = CharField()
|
child = CharField()
|
||||||
|
|
||||||
|
def to_representation(self, value):
|
||||||
|
if value is None and self.allow_null:
|
||||||
|
return None
|
||||||
|
return super(StringListField, self).to_representation(value)
|
||||||
|
|
||||||
|
|
||||||
class URLField(CharField):
|
class URLField(CharField):
|
||||||
|
|
||||||
|
|||||||
@@ -473,9 +473,6 @@ SOCIAL_AUTH_SAML_TECHNICAL_CONTACT = {}
|
|||||||
SOCIAL_AUTH_SAML_SUPPORT_CONTACT = {}
|
SOCIAL_AUTH_SAML_SUPPORT_CONTACT = {}
|
||||||
SOCIAL_AUTH_SAML_ENABLED_IDPS = {}
|
SOCIAL_AUTH_SAML_ENABLED_IDPS = {}
|
||||||
|
|
||||||
SOCIAL_AUTH_ORGANIZATION_MAP = {}
|
|
||||||
SOCIAL_AUTH_TEAM_MAP = {}
|
|
||||||
|
|
||||||
# Any ANSIBLE_* settings will be passed to the subprocess environment by the
|
# Any ANSIBLE_* settings will be passed to the subprocess environment by the
|
||||||
# celery task.
|
# celery task.
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,8 @@ register(
|
|||||||
register(
|
register(
|
||||||
'SOCIAL_AUTH_ORGANIZATION_MAP',
|
'SOCIAL_AUTH_ORGANIZATION_MAP',
|
||||||
field_class=fields.SocialOrganizationMapField,
|
field_class=fields.SocialOrganizationMapField,
|
||||||
default={},
|
allow_null=True,
|
||||||
|
default=None,
|
||||||
label=_('Social Auth Organization Map'),
|
label=_('Social Auth Organization Map'),
|
||||||
help_text=SOCIAL_AUTH_ORGANIZATION_MAP_HELP_TEXT,
|
help_text=SOCIAL_AUTH_ORGANIZATION_MAP_HELP_TEXT,
|
||||||
category=_('Authentication'),
|
category=_('Authentication'),
|
||||||
@@ -137,7 +138,8 @@ register(
|
|||||||
register(
|
register(
|
||||||
'SOCIAL_AUTH_TEAM_MAP',
|
'SOCIAL_AUTH_TEAM_MAP',
|
||||||
field_class=fields.SocialTeamMapField,
|
field_class=fields.SocialTeamMapField,
|
||||||
default={},
|
allow_null=True,
|
||||||
|
default=None,
|
||||||
label=_('Social Auth Team Map'),
|
label=_('Social Auth Team Map'),
|
||||||
help_text=SOCIAL_AUTH_TEAM_MAP_HELP_TEXT,
|
help_text=SOCIAL_AUTH_TEAM_MAP_HELP_TEXT,
|
||||||
category=_('Authentication'),
|
category=_('Authentication'),
|
||||||
|
|||||||
Reference in New Issue
Block a user