From 2bdcc915915388deb24332995aa9d5ad2ec65ec3 Mon Sep 17 00:00:00 2001 From: Bryan Bonvallet Date: Tue, 13 Jan 2015 14:27:19 -0500 Subject: [PATCH] #388 ensure self.slug is not the empty string --- karmaworld/apps/notes/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/karmaworld/apps/notes/models.py b/karmaworld/apps/notes/models.py index 8710af7..c6c2a52 100644 --- a/karmaworld/apps/notes/models.py +++ b/karmaworld/apps/notes/models.py @@ -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]) -- 2.25.1