mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-27 10:21:49 -05:00
block user from shooting themselves in the foot by scheduling a manual project
This commit is contained in:
@@ -2826,6 +2826,8 @@ class ScheduleSerializer(BaseSerializer):
|
||||
def validate_unified_job_template(self, value):
|
||||
if type(value) == InventorySource and value.source not in SCHEDULEABLE_PROVIDERS:
|
||||
raise serializers.ValidationError(_('Inventory Source must be a cloud resource.'))
|
||||
elif type(value) == Project and value.scm_type == '':
|
||||
raise serializers.ValidationError(_('Manual Project can not have a schedule set.'))
|
||||
return value
|
||||
|
||||
# We reject rrules if:
|
||||
|
||||
Reference in New Issue
Block a user