From 867c22c36ca03fd0dcb640f4be1f33f985ee27e9 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 31 Jan 2014 09:04:07 -0500 Subject: [PATCH] Fix AC-981, mark last_job* fields as read only on the host serializer so activity stream will ignore them when processing events --- awx/api/serializers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index ff17384875..439682d474 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -442,6 +442,10 @@ class InventorySerializer(BaseSerializerWithVariables): class HostSerializer(BaseSerializerWithVariables): + # Allow the serializer to treat these fields as read-only + last_job = serializers.Field() + last_job_host_summary = serializers.Field() + class Meta: model = Host fields = BASE_FIELDS + ('inventory', 'enabled', 'instance_id', 'variables',