diff --git a/zds/utils/models.py b/zds/utils/models.py index f10b301e9e..3d89d46cf8 100644 --- a/zds/utils/models.py +++ b/zds/utils/models.py @@ -289,7 +289,7 @@ class Meta: class TagManager(models.Manager): def get_from_title(self, title): - if len(slugify(title.strip())) < 1: + if not title.strip() or not slugify(title.strip().replace("-", "")): raise ValueError('tag "{}" is not correct'.format(title)) current_tag = self.filter(title=title).first() if current_tag is None: