Проектный канал без проекта (jt_job_id null) ассистентом не обрабатывается
All checks were successful
ci / test (push) Successful in 22s
ci / deploy (push) Successful in 1m38s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 22:01:31 +03:00
parent b91aa4bbbf
commit b975ae0bc3

View File

@@ -76,7 +76,7 @@ export class SlackIntake {
/** Проектный канал: проект определяется каналом (таблица project_channel). */
async findProjectByChannel(channel: string): Promise<{ jobId: string; jobName: string | null } | null> {
const { rows } = await this.pool.query(
"select pc.jt_job_id, j.name from project_channel pc left join jt_job j on j.id = pc.jt_job_id where pc.channel_id = $1 and pc.is_enabled",
"select pc.jt_job_id, j.name from project_channel pc left join jt_job j on j.id = pc.jt_job_id where pc.channel_id = $1 and pc.is_enabled and pc.jt_job_id is not null",
[channel],
);
return rows[0] ? { jobId: String(rows[0].jt_job_id), jobName: (rows[0].name as string | null) ?? null } : null;