diff --git a/luigi/server.py b/luigi/server.py index a10d668dbc..974e3f2cf8 100644 --- a/luigi/server.py +++ b/luigi/server.py @@ -266,8 +266,9 @@ def get(self, id): class ByTaskIdHandler(BaseTaskHistoryHandler): def get(self, task_id): - task = self._scheduler.task_history.find_task_by_task_id(task_id) - self.render("show.html", task=task) + with self._scheduler.task_history._session(None) as session: + task = self._scheduler.task_history.find_task_by_task_id(task_id, session) + self.render("show.html", task=task) class ByParamsHandler(BaseTaskHistoryHandler):