mirror of
https://github.com/ansible/awx.git
synced 2026-04-14 06:29:25 -02:30
hide scm revision for manual projects
This commit is contained in:
@@ -980,6 +980,12 @@ class ProjectSerializer(UnifiedJobTemplateSerializer, ProjectOptionsSerializer):
|
|||||||
args=(obj.last_update.pk,))
|
args=(obj.last_update.pk,))
|
||||||
return res
|
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):
|
def validate(self, attrs):
|
||||||
organization = None
|
organization = None
|
||||||
if 'organization' in attrs:
|
if 'organization' in attrs:
|
||||||
|
|||||||
Reference in New Issue
Block a user