From 6e33065e4fdcaf8ca416eeac52f3cbe136fef498 Mon Sep 17 00:00:00 2001 From: Daniel Yohan Date: Thu, 14 Nov 2019 16:12:54 -0300 Subject: [PATCH] [fix] Validation Examples --- bothub/api/v2/repository/validators.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bothub/api/v2/repository/validators.py b/bothub/api/v2/repository/validators.py index 10de641c..ce04ef93 100644 --- a/bothub/api/v2/repository/validators.py +++ b/bothub/api/v2/repository/validators.py @@ -53,7 +53,10 @@ def __call__(self, attrs): sentence = attrs.get("text") if RepositoryExample.objects.filter( - text=sentence, intent=intent, repository_update__repository=repository + text=sentence, + intent=intent, + repository_update__repository=repository, + deleted_in__isnull=True, ).count(): raise ValidationError(_("Intention and Sentence already exists"))