Adding the scm_track_submodules option which should fix the https://github.com/ansible/awx/issues/7846

Signed-off-by: mazhead <mazhead@gmail.com>
This commit is contained in:
mazhead
2021-02-03 11:52:43 +01:00
parent 311c44341e
commit c6eb7da68d
18 changed files with 95 additions and 3 deletions

View File

@@ -1350,6 +1350,7 @@ class ProjectOptionsSerializer(BaseSerializer):
'scm_branch',
'scm_refspec',
'scm_clean',
'scm_track_submodules',
'scm_delete_on_update',
'credential',
'timeout',
@@ -1497,7 +1498,7 @@ class ProjectSerializer(UnifiedJobTemplateSerializer, ProjectOptionsSerializer):
)
if get_field_from_model_or_attrs('scm_type') == '':
for fd in ('scm_update_on_launch', 'scm_delete_on_update', 'scm_clean'):
for fd in ('scm_update_on_launch', 'scm_delete_on_update', 'scm_track_submodules', 'scm_clean'):
if get_field_from_model_or_attrs(fd):
raise serializers.ValidationError({fd: _('Update options must be set to false for manual projects.')})
return super(ProjectSerializer, self).validate(attrs)