Merge pull request #5197 from ryanpetrello/fix-5141

only hide scm revision for manual projects if the key already exists
This commit is contained in:
Ryan Petrello
2017-02-06 12:24:40 -05:00
committed by GitHub

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