mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Skip settings field validation for encrypted fields if submitted value is the $encrypted$ placeholder.
This commit is contained in:
parent
9feef6e76a
commit
f2e2ca30ab
@ -50,6 +50,8 @@ class SettingFieldMixin(object):
|
||||
return obj
|
||||
|
||||
def to_internal_value(self, value):
|
||||
if getattr(self, 'encrypted', False) and isinstance(value, basestring) and value.startswith('$encrypted$'):
|
||||
raise serializers.SkipField()
|
||||
obj = super(SettingFieldMixin, self).to_internal_value(value)
|
||||
return super(SettingFieldMixin, self).to_representation(obj)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user