mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Updated migration + serializers as suggested
Signed-off-by: mazhead <mazhead@gmail.com>
This commit is contained in:
parent
5f93ba7690
commit
83d340ab1f
@ -1385,6 +1385,8 @@ class ProjectOptionsSerializer(BaseSerializer):
|
||||
errors['scm_branch'] = _('SCM branch cannot be used with archive projects.')
|
||||
if attrs.get('scm_refspec') and scm_type != 'git':
|
||||
errors['scm_refspec'] = _('SCM refspec can only be used with git projects.')
|
||||
if attrs.get('scm_track_submodules') and scm_type != 'git':
|
||||
errors['scm_track_submodules'] = _('SCM track_submodules can only be used with git projects.')
|
||||
|
||||
if errors:
|
||||
raise serializers.ValidationError(errors)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Generated by Django 2.2.16 on 2021-02-02 14:41
|
||||
# Generated by Django 2.2.16 on 2021-04-13 19:21
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
@ -11,21 +11,11 @@ class Migration(migrations.Migration):
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='Project',
|
||||
name='scm_track_submodules',
|
||||
field=models.BooleanField(default=False, help_text='Track submodule latest commit on specified branch.'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='ProjectUpdate',
|
||||
name='scm_track_submodules',
|
||||
field=models.BooleanField(default=False, help_text='Track submodule latest commit on specified branch.'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='project',
|
||||
name='scm_track_submodules',
|
||||
field=models.BooleanField(default=False, help_text='Track submodules latest commits on defined branch.'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
migrations.AddField(
|
||||
model_name='projectupdate',
|
||||
name='scm_track_submodules',
|
||||
field=models.BooleanField(default=False, help_text='Track submodules latest commits on defined branch.'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user