# HG changeset patch # User Johannes Bornhold # Date 2016-09-08 15:31:37 # Node ID 7dc19d72fc6896c06902bf7e239802a68a50cf91 # Parent d9e392db2b1c23fdc19ca2ca4d56db6d046ca0f4 summary: Correctly return the Node instance Noticed that I was returning the ReadmeMatch instance. diff --git a/rhodecode/controllers/summary.py b/rhodecode/controllers/summary.py --- a/rhodecode/controllers/summary.py +++ b/rhodecode/controllers/summary.py @@ -101,7 +101,7 @@ class SummaryController(BaseRepoControll renderer = MarkupRenderer() try: return renderer.render( - readme_node.content, filename=readme_node.file) + readme_node.content, filename=readme_node.path) except Exception: log.exception( "Exception while trying to render the README") diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -987,7 +987,7 @@ class ReadmeFinder: matches = self._match_readmes(nodes) matches = self._sort_according_to_priority(matches) if matches: - return matches[0] + return matches[0].node paths = self._match_paths(nodes) paths = self._sort_paths_according_to_priority(paths) @@ -1041,13 +1041,13 @@ class ReadmeFinder: class ReadmeMatch: def __init__(self, node, match, priority): - self._node = node + self.node = node self._match = match self.priority = priority @property def path(self): - return self._node.path + return self.node.path def __repr__(self): return '