From b5a160561ad5ab30fb2e6131d06b6b4b24b21bb8 Mon Sep 17 00:00:00 2001 From: Josh Williams Date: Tue, 15 Oct 2013 15:27:48 -0400 Subject: [PATCH] Put slug look-up back into place, seems good --- karmaworld/apps/notes/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/karmaworld/apps/notes/models.py b/karmaworld/apps/notes/models.py index f8a0059..cc7a262 100644 --- a/karmaworld/apps/notes/models.py +++ b/karmaworld/apps/notes/models.py @@ -76,8 +76,7 @@ class Document(models.Model): """ generate a unique slug based on name and uploaded_at """ _slug = defaultfilters.slugify(self.name) klass = self.__class__ - #collision = klass.objects.filter(slug=_slug) - collision = True + collision = klass.objects.filter(slug=_slug) if collision: _slug = u"{0}-{1}-{2}-{3}".format( _slug, self.uploaded_at.month, -- 2.25.1