mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 09:57:33 -02:30
Update logic in send method to recognize password field in upgraded webhook notifications
This commit is contained in:
@@ -118,9 +118,10 @@ class NotificationTemplate(CommonModelNameNotUnique):
|
||||
def send(self, subject, body):
|
||||
for field in filter(lambda x: self.notification_class.init_parameters[x]['type'] == "password",
|
||||
self.notification_class.init_parameters):
|
||||
self.notification_configuration[field] = decrypt_field(self,
|
||||
'notification_configuration',
|
||||
subfield=field)
|
||||
if field in self.notification_configuration:
|
||||
self.notification_configuration[field] = decrypt_field(self,
|
||||
'notification_configuration',
|
||||
subfield=field)
|
||||
recipients = self.notification_configuration.pop(self.notification_class.recipient_parameter)
|
||||
if not isinstance(recipients, list):
|
||||
recipients = [recipients]
|
||||
|
||||
Reference in New Issue
Block a user