Return full webhook dict when serializing notif.

This commit is contained in:
Jim Ladd
2019-10-23 10:57:18 -07:00
parent 32deca2e92
commit fc941eda98
+2 -2
View File
@@ -4522,8 +4522,8 @@ class NotificationSerializer(BaseSerializer):
# attempt to load json string
try:
potential_body = json.loads(obj.body)
if isinstance(potential_body, dict) and 'body' in potential_body:
return potential_body['body']
if isinstance(potential_body, dict):
return potential_body
except json.JSONDecodeError:
pass
return obj.body