From b0118957ff3304226f3500b4f5cfaecc41e9ee48 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Wed, 23 Jan 2013 16:40:39 -0600 Subject: [PATCH] We don't want any empty string slugs, so make "" -> None --- mediagoblin/db/mixin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mediagoblin/db/mixin.py b/mediagoblin/db/mixin.py index c4c508a4..98414d72 100644 --- a/mediagoblin/db/mixin.py +++ b/mediagoblin/db/mixin.py @@ -89,6 +89,10 @@ class MediaEntryMixin(object): # assign slug based on 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? # If not, we're not going to get a slug # so just return... we're not going to force one. -- 2.25.1