From 3cac7c4f6c5cf94546e961efdb58de066384e2fd Mon Sep 17 00:00:00 2001 From: Cristopher De Sousa Freitas Date: Thu, 28 Mar 2019 10:53:23 -0300 Subject: [PATCH] Change validation error from dict to array --- bothub/api/v2/validation/validators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bothub/api/v2/validation/validators.py b/bothub/api/v2/validation/validators.py index eced285a..5a39b4b5 100644 --- a/bothub/api/v2/validation/validators.py +++ b/bothub/api/v2/validation/validators.py @@ -15,9 +15,9 @@ class DoesIntentExistValidator(object): def __call__(self, value): examples = RepositoryExample.objects.filter(intent=value) if not examples.exists(): - raise ValidationError({'intent': _( + raise ValidationError(_( 'Intent MUST match existing intents for training. ' - )}) + )) class DoesEntityAndLabelExistValidator(object):