mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 21:37:42 -02:30
Add more verification when deserializing json changes field on activity stream
This commit is contained in:
@@ -979,7 +979,12 @@ class ActivityStreamSerializer(BaseSerializer):
|
|||||||
def get_changes(self, obj):
|
def get_changes(self, obj):
|
||||||
if obj is None:
|
if obj is None:
|
||||||
return {}
|
return {}
|
||||||
return json.loads(obj.changes)
|
try:
|
||||||
|
d_changes = json.loads(obj.changes)
|
||||||
|
return d_changes
|
||||||
|
except Exception, e:
|
||||||
|
logger.warn("Error deserializing activity stream json changes")
|
||||||
|
return {}
|
||||||
|
|
||||||
def get_related(self, obj):
|
def get_related(self, obj):
|
||||||
if obj is None:
|
if obj is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user