mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 07:26:03 -03:30
Merge pull request #3974 from AlanCoding/notification_test
Avoid using serialized notification configuraiton
This commit is contained in:
@@ -2680,9 +2680,10 @@ class NotificationTemplateSerializer(BaseSerializer):
|
||||
def to_representation(self, obj):
|
||||
ret = super(NotificationTemplateSerializer, self).to_representation(obj)
|
||||
for field in obj.notification_class.init_parameters:
|
||||
if field in ret['notification_configuration'] and \
|
||||
force_text(ret['notification_configuration'][field]).startswith('$encrypted$'):
|
||||
ret['notification_configuration'][field] = '$encrypted$'
|
||||
config = obj.notification_configuration
|
||||
if field in config and force_text(config[field]).startswith('$encrypted$'):
|
||||
config[field] = '$encrypted$'
|
||||
ret['notification_configuration'] = config
|
||||
return ret
|
||||
|
||||
def get_related(self, obj):
|
||||
|
||||
Reference in New Issue
Block a user