#388 ensure self.slug is not the empty string
authorBryan Bonvallet <btbonval@gmail.com>
Tue, 13 Jan 2015 19:27:19 +0000 (14:27 -0500)
committerBryan Bonvallet <btbonval@gmail.com>
Tue, 13 Jan 2015 19:27:19 +0000 (14:27 -0500)
karmaworld/apps/notes/models.py

index 8710af7f096678dd83f5d2d0fcbf8471512add7a..c6c2a52aad0c9d7b5bb1815ce70c145511bdb744 100644 (file)
@@ -299,7 +299,7 @@ class Note(Document):
         """ Resolve note url, use 'note' route and slug if slug
             otherwise use note.id
         """
-        if self.slug is not None:
+        if self.slug:
             # return a url ending in slug
             if self.course.school:
                 return reverse('note_detail', args=[self.course.school.slug, self.course.slug, self.slug])