From c8805cc55b851906c43def1b544383eee4e27989 Mon Sep 17 00:00:00 2001 From: Jim Ladd Date: Tue, 20 Aug 2019 23:41:30 -0700 Subject: [PATCH] No need to merge old/new notification messages if messages field is null --- awx/main/models/notifications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/models/notifications.py b/awx/main/models/notifications.py index cfdc89f4fc..e3b69128d8 100644 --- a/awx/main/models/notifications.py +++ b/awx/main/models/notifications.py @@ -128,7 +128,7 @@ class NotificationTemplate(CommonModelNameNotUnique): old_messages = old_nt.messages new_messages = self.messages - if old_messages is not None: + if old_messages is not None and new_messages is not None: for event in ['started', 'success', 'error']: if not new_messages.get(event, {}) and old_messages.get(event, {}): new_messages[event] = old_messages[event]