diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-01-23 16:40:39 -0600 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-01-23 16:40:39 -0600 |
commit | b0118957ff3304226f3500b4f5cfaecc41e9ee48 (patch) | |
tree | f487631882ca424681fe7974d7b30258eed39f6c | |
parent | 266b42b3dc7697801f726875e1a734b9e4ba7dc9 (diff) | |
download | mediagoblin-b0118957ff3304226f3500b4f5cfaecc41e9ee48.tar.lz mediagoblin-b0118957ff3304226f3500b4f5cfaecc41e9ee48.tar.xz mediagoblin-b0118957ff3304226f3500b4f5cfaecc41e9ee48.zip |
We don't want any empty string slugs, so make "" -> None
-rw-r--r-- | mediagoblin/db/mixin.py | 4 |
1 files changed, 4 insertions, 0 deletions
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. |