From 2955af705ea893761b932c40c061dc55b3fbf5dc Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Wed, 3 Aug 2016 11:37:11 -0400 Subject: [PATCH] fix error in job schema introduced in ask_skip_tags change --- awx/api/serializers.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 06bffdf446..3def9ae19b 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -1906,14 +1906,20 @@ class JobTemplateSerializer(UnifiedJobTemplateSerializer, JobOptionsSerializer): class JobSerializer(UnifiedJobSerializer, JobOptionsSerializer): + passwords_needed_to_start = serializers.ReadOnlyField() + ask_variables_on_launch = serializers.ReadOnlyField() + ask_limit_on_launch = serializers.ReadOnlyField() + ask_skip_tags_on_launch = serializers.ReadOnlyField() + ask_tags_on_launch = serializers.ReadOnlyField() + ask_job_type_on_launch = serializers.ReadOnlyField() + ask_inventory_on_launch = serializers.ReadOnlyField() + ask_credential_on_launch = serializers.ReadOnlyField() + class Meta: model = Job - fields = ('*', 'job_template', ) - read_only_fields = ( - '*', 'passwords_needed_to_start', 'ask_variables_on_launch', - 'ask_limit_on_launch', 'ask_tags_on_launch', - 'ask_skip_tags_on_launch', 'ask_job_type_on_launch', - 'ask_inventory_on_launch', 'ask_credential_on_launch') + fields = ('*', 'job_template', 'passwords_needed_to_start', 'ask_variables_on_launch', + 'ask_limit_on_launch', 'ask_tags_on_launch', 'ask_skip_tags_on_launch', + 'ask_job_type_on_launch', 'ask_inventory_on_launch', 'ask_credential_on_launch') def get_related(self, obj): res = super(JobSerializer, self).get_related(obj)