Add more verification when deserializing json changes field on activity stream

This commit is contained in:
Matthew Jones 2013-11-19 10:48:05 -05:00
parent 7fda453720
commit 66d6e2fe43

View File

@ -979,7 +979,12 @@ class ActivityStreamSerializer(BaseSerializer):
def get_changes(self, obj):
if obj is None:
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):
if obj is None: