We don't want any empty string slugs, so make "" -> None
This commit is contained in:
parent
266b42b3dc
commit
b0118957ff
@ -89,6 +89,10 @@ class MediaEntryMixin(object):
|
|||||||
# assign slug based on title
|
# assign slug based on title
|
||||||
self.slug = slugify(self.title)
|
self.slug = slugify(self.title)
|
||||||
|
|
||||||
|
# We don't want any empty string slugs
|
||||||
|
if self.slug == u"":
|
||||||
|
self.slug = None
|
||||||
|
|
||||||
# Do we have anything at this point?
|
# Do we have anything at this point?
|
||||||
# If not, we're not going to get a slug
|
# If not, we're not going to get a slug
|
||||||
# so just return... we're not going to force one.
|
# so just return... we're not going to force one.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user