diff --git a/packages/khbuild_assistant_prep/src/slack/intake.ts b/packages/khbuild_assistant_prep/src/slack/intake.ts index ec7546b..45838b9 100644 --- a/packages/khbuild_assistant_prep/src/slack/intake.ts +++ b/packages/khbuild_assistant_prep/src/slack/intake.ts @@ -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;