From 6258035ca8c6116a3f14c4ecc98db807067b799e Mon Sep 17 00:00:00 2001 From: James Laska Date: Fri, 13 Mar 2015 08:52:23 -0400 Subject: [PATCH] Make ValidationError consistent with rest-framework This is silly, but rest-framework returns an error with a '.' at the end. Test automation validates the error responses. Rather than special case this condition, I've chosen to raise an Exception with a msg consistent with rest-framework. --- awx/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 8cbb7708f0..8e5782a834 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -1308,7 +1308,7 @@ class JobOptionsSerializer(BaseSerializer): def validate_project(self, attrs, source): project = attrs.get('project', None) if not project and attrs.get('job_type') != PERM_INVENTORY_SCAN: - raise serializers.ValidationError("This field is required") + raise serializers.ValidationError("This field is required.") return attrs def validate_playbook(self, attrs, source):