Permalink
Browse files

Always regenerate slug on save

  • Loading branch information...
jmagnusson committed May 11, 2011
1 parent d48f465 commit e11b84e4dd5ff0e8eb99b7c38b0becab748a3224
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/sluggable/models.py
View
@@ -61,9 +61,8 @@ def _generate_base_slug(self):
return slugify(u'%s' % self)
def save(self, *args, **kwargs):
- if self.slug is None or self.slug == '':
- self.slug = self._generate_slug()
-
+ self.slug = self._generate_slug()
+
return super(SluggableModel, self).save(*args, **kwargs)
class Meta:

0 comments on commit e11b84e

Please sign in to comment.