fix: Type error when empty 'Rich Text' content saved in Blog Post

This commit is contained in:
Abhishek Balam 2020-05-20 12:14:03 +05:30
parent 66a63bbc99
commit f4cd72c792

View file

@ -101,7 +101,7 @@ class BlogPost(WebsiteGenerator):
context.comment_text = _('{0} comments').format(len(context.comment_list))
def set_read_time(self):
content = self.content or self.content_html
content = self.content or self.content_html or ''
if self.content_type == "Markdown":
content = markdown(self.content_md)