fix(workspace): a new session shows in its workspace
This commit is contained in:
@@ -161,8 +161,13 @@ router.get("/", (req, res) => {
|
||||
params.push(tool);
|
||||
}
|
||||
if (lane !== undefined) {
|
||||
where.push("s.lane_id = ?");
|
||||
params.push(Number(lane));
|
||||
// Also a session one of the lane's runs holds that nothing stamped yet:
|
||||
// two dashboards may share the DB and hooks reach only one of them, which
|
||||
// may be an older build that never stamps (bindRunSession).
|
||||
where.push(
|
||||
"(s.lane_id = ? OR (s.lane_id IS NULL AND s.id IN (SELECT session_id FROM dashboard_runs WHERE lane_id = ?)))"
|
||||
);
|
||||
params.push(Number(lane), Number(lane));
|
||||
}
|
||||
// `archived=0|1` = only live / only archived; absent = both, as before.
|
||||
if (req.query.archived === "0") where.push("s.archived_at IS NULL");
|
||||
|
||||
Reference in New Issue
Block a user