mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 21:51:26 -03:30
Fix AC-648... make sure the changes field is not represented using nested json
This commit is contained in:
parent
94bbab566b
commit
7fda453720
@ -969,11 +969,18 @@ class JobEventSerializer(BaseSerializer):
|
||||
|
||||
class ActivityStreamSerializer(BaseSerializer):
|
||||
|
||||
changes = serializers.SerializerMethodField('get_changes')
|
||||
|
||||
class Meta:
|
||||
model = ActivityStream
|
||||
fields = ('id', 'url', 'related', 'summary_fields', 'timestamp', 'operation', 'changes',
|
||||
'object1_id', 'object1', 'object1_type', 'object2_id', 'object2', 'object2_type', 'object_relationship_type')
|
||||
|
||||
def get_changes(self, obj):
|
||||
if obj is None:
|
||||
return {}
|
||||
return json.loads(obj.changes)
|
||||
|
||||
def get_related(self, obj):
|
||||
if obj is None:
|
||||
return {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user