Merge pull request #10407 from abhishekbalam/blog-type-error

fix: Type error when empty "Rich Text" content saved in Blog Post
This commit is contained in:
mergify[bot] 2020-05-20 08:04:07 +00:00 committed by GitHub
commit e6efd9960f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,7 +124,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)