From b81a961fdd511833d7ddd356f538100164053ab3 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 4 Oct 2016 09:19:42 -0700 Subject: [PATCH] Remove Message.set_rendered_content(). --- zerver/models.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/zerver/models.py b/zerver/models.py index a942c7d300..f2e7582af0 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -854,26 +854,6 @@ class Message(ModelReprMixin, models.Model): return rendered_content - def set_rendered_content(self, rendered_content, save = False): - # type: (text_type, bool) -> bool - """Set the content on the message. - """ - # TODO: see #1379 to eliminate bugdown dependencies - global bugdown - if bugdown is None: - import zerver.lib.bugdown as bugdown - # 'from zerver.lib import bugdown' gives mypy error in python 3 mode. - - self.rendered_content = rendered_content - self.rendered_content_version = bugdown.version - - if self.rendered_content is not None: - if save: - self.save_rendered_content() - return True - else: - return False - def save_rendered_content(self): # type: () -> None self.save(update_fields=["rendered_content", "rendered_content_version"])