Merge pull request #3679 from AlanCoding/3677

Fixes for manual groups/projects
This commit is contained in:
Alan Rominger
2016-11-22 11:46:34 -05:00
committed by GitHub
5 changed files with 26 additions and 9 deletions
+2
View File
@@ -2833,6 +2833,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: