only hide scm revision for manual projects if the key already exists

see: #5141
This commit is contained in:
Ryan Petrello 2017-02-06 11:43:04 -05:00
parent 03e2fd8760
commit 80ac25f26b

View File

@ -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