check that slugify has returned anything
This commit is contained in:
parent
6e3b6002c2
commit
365827805c
|
@ -43,6 +43,8 @@ class Village(UUIDModel, CampRelatedModel):
|
|||
Village.objects.filter(slug=self.slug).count() > 1
|
||||
):
|
||||
slug = slugify(self.name)
|
||||
if not slug:
|
||||
slug = "noname"
|
||||
incrementer = 1
|
||||
|
||||
# We have to make sure that the slug won't clash with current slugs
|
||||
|
|
Loading…
Reference in a new issue