From 828821ada685c7bf2d3c320038462d3ad81d4ee7 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Thu, 20 Jul 2017 08:49:46 -0400 Subject: [PATCH] tell user how to use update_on_launch with source_project --- awx/api/serializers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 46430d10a0..72d805006c 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -1672,7 +1672,9 @@ class InventorySourceSerializer(UnifiedJobTemplateSerializer, InventorySourceOpt if attrs.get('source_path', None) and source!='scm': raise serializers.ValidationError({"detail": _("Cannot set source_path if not SCM type.")}) elif update_on_launch and source=='scm' and update_on_project_update: - raise serializers.ValidationError({"detail": _("Cannot update SCM-based inventory source on launch.")}) + raise serializers.ValidationError({"detail": _( + "Cannot update SCM-based inventory source on launch if set to update on project update. " + "Instead, configure the corresponding source project to update on launch.")}) elif not self.instance and attrs.get('inventory', None) and InventorySource.objects.filter( inventory=attrs.get('inventory', None), update_on_project_update=True, source='scm').exists(): raise serializers.ValidationError({"detail": _("Inventory controlled by project-following SCM.")})