--- a/candolint/handlers.py Mon Sep 18 18:52:34 2017 +0800
+++ b/candolint/handlers.py Tue Sep 19 22:29:13 2017 +0800
- def get_html(self, project, check, lines):
- adapter = project.get_adapter()
- line['link'] = adapter.get_line_url(check.change, line)
+ def get_reference_check(self, check):
.select(*Check.get_light_fields())
.where(Check.project == check.project)
.where(Check.ordinal < check.ordinal)
.order_by(Check.ordinal.desc())
+ def get_html(self, project, check, lines):
+ adapter = project.get_adapter()
+ line['link'] = adapter.get_line_url(check.change, line)
+ reference = self.get_reference_check(check)
self.render('check.html', project=project, check=check, lines=lines, adapter=adapter, reference=reference)