From 80ac25f26bf80d4c4e50576f98c26586359f7d9b Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Mon, 6 Feb 2017 11:43:04 -0500 Subject: [PATCH] only hide scm revision for manual projects if the key already exists see: #5141 --- awx/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index e4c5ba3965..cdb30e113d 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -977,7 +977,7 @@ class ProjectSerializer(UnifiedJobTemplateSerializer, ProjectOptionsSerializer): def to_representation(self, obj): ret = super(ProjectSerializer, self).to_representation(obj) - if obj.scm_type == '': + if 'scm_revision' in ret and obj.scm_type == '': ret['scm_revision'] = '' return ret