If I hired someone that wrote code like this, I would fire them.
parent
44679a7892
commit
d8bbb4c3c2
|
@ -142,7 +142,7 @@ class Snipt(models.Model):
|
|||
def get_full_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, self.slug)
|
||||
|
|
Loading…
Reference in New Issue