From 7e0eb4d86af9a1688e306cd7bc50f17b727c64cb Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Thu, 17 Jan 2013 00:10:31 -0500 Subject: [PATCH] Blog domain URLs --- snipts/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snipts/models.py b/snipts/models.py index 49d8be5..6a8b97a 100644 --- a/snipts/models.py +++ b/snipts/models.py @@ -126,7 +126,7 @@ class Snipt(models.Model): def get_absolute_url(self): if self.blog_post: - if self.user.profile.is_pro and self.user.profile.blog_domain is not None: + if self.user.profile.is_pro and self.user.profile.blog_domain is not None and self.user.profile.blog_domain != '': return 'http://{}/{}/'.format(self.user.profile.blog_domain, self.slug) else: return 'https://{}.snipt.net/{}/'.format(self.user.username.replace('_', '-'), self.slug)