From 001027e2cb849a569284928301a3915b23edcc89 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Mon, 30 Jan 2017 09:24:01 -0500 Subject: [PATCH] hide scm revision for manual projects --- awx/api/serializers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 2845328bad..0a10c8271c 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -980,6 +980,12 @@ class ProjectSerializer(UnifiedJobTemplateSerializer, ProjectOptionsSerializer): args=(obj.last_update.pk,)) return res + def to_representation(self, obj): + ret = super(ProjectSerializer, self).to_representation(obj) + if obj.scm_type == '': + ret['scm_revision'] = '' + return ret + def validate(self, attrs): organization = None if 'organization' in attrs: