mirror of
https://github.com/ansible/awx.git
synced 2026-01-22 06:58:06 -03:30
update JT playbook validation for HA
This commit is contained in:
parent
cd48427189
commit
3c24105271
@ -1847,7 +1847,7 @@ class JobOptionsSerializer(LabelsListMixin, BaseSerializer):
|
||||
job_type = attrs.get('job_type', self.instance and self.instance.job_type or None)
|
||||
if not project and job_type != PERM_INVENTORY_SCAN:
|
||||
raise serializers.ValidationError({'project': 'This field is required.'})
|
||||
if project and playbook and force_text(playbook) not in project.playbooks:
|
||||
if project and playbook and force_text(playbook) not in project.playbook_files:
|
||||
raise serializers.ValidationError({'playbook': 'Playbook not found for project.'})
|
||||
if project and not playbook:
|
||||
raise serializers.ValidationError({'playbook': 'Must select playbook for project.'})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user