Blog domain URLs

master
Nick Sergeant 2013-01-17 00:10:31 -05:00
parent 91420897ae
commit 7e0eb4d86a
1 changed files with 1 additions and 1 deletions

View File

@ -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)