Skip to content

Commit

Permalink
[fix] Validation Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dyohan9 committed Nov 14, 2019
1 parent c856924 commit 6e33065
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bothub/api/v2/repository/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))

Expand Down

0 comments on commit 6e33065

Please sign in to comment.