# HG changeset patch # User Marcin Kuzminski # Date 2017-04-20 12:04:15 # Node ID e352663337af37909c616ee2ed544d331ea0dec7 # Parent a43e4e95799700b4a65bd34eab3fd5c014aad3f7 comments: remove helper to render a comment object. - we always use helper renderer, and for consistency we should stick with that. It makes refactoring, and general use much harder. DB objects should have least possible logic inside. diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -3096,10 +3096,6 @@ class ChangesetComment(Base, BaseModel): return self.get_index_from_version( self.pull_request_version_id, versions) - def render(self, mentions=False): - from rhodecode.lib import helpers as h - return h.render(self.text, renderer=self.renderer, mentions=mentions) - def __repr__(self): if self.comment_id: return '' % self.comment_id diff --git a/rhodecode/templates/changeset/changeset_file_comment.mako b/rhodecode/templates/changeset/changeset_file_comment.mako --- a/rhodecode/templates/changeset/changeset_file_comment.mako +++ b/rhodecode/templates/changeset/changeset_file_comment.mako @@ -158,7 +158,7 @@
- ${comment.render(mentions=True)|n} + ${h.render(comment.text, renderer=comment.renderer, mentions=True)}