The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
fix(issues): replace non-null assertions with null checks in checkout re-read
plind-dmc9ee8e7a7e1e
diff --git a/server/src/services/issues.ts b/server/src/services/issues.tsindex 832c4e1761..3e1b2eb2c2 100644--- a/server/src/services/issues.ts+++ b/server/src/services/issues.ts@@ -1469,7 +1469,8 @@ export function issueService(db: Db) {expectedCheckoutRunId: current.checkoutRunId,});if (adopted) {- const row = await db.select().from(issues).where(eq(issues.id, id)).then((rows) => rows[0]!);+ const row = await db.select().from(issues).where(eq(issues.id, id)).then((rows) => rows[0] ?? null);+ if (!row) throw notFound("Issue not found");const [enriched] = await withIssueLabels(db, [row]);return enriched;}@@ -1481,7 +1482,8 @@ export function issueService(db: Db) {current.status === "in_progress" &&sameRunLock(current.checkoutRunId, checkoutRunId)) {- const row = await db.select().from(issues).where(eq(issues.id, id)).then((rows) => rows[0]!);+ const row = await db.select().from(issues).where(eq(issues.id, id)).then((rows) => rows[0] ?? null);+ if (!row) throw notFound("Issue not found");const [enriched] = await withIssueLabels(db, [row]);return enriched;}