fix(autumn): guard ensureTeamProvisioned with autumnClient null check

Without this guard, ensureTeamProvisioned makes a Supabase query to
resolve orgId even when autumnClient is null, only for every subsequent
Autumn API call to no-op. The team also never gets cached, so the
wasted query repeats on every call.

Co-Authored-By: micahstairs <micah@sideguide.dev>
This commit is contained in:
firecrawl-spring[bot]
2026-03-11 11:18:34 +00:00
parent 258aa444c0
commit 4afedfce23

View File

@@ -258,6 +258,7 @@ export class AutumnService {
orgId,
name,
}: EnsureTeamProvisionedParams): Promise<void> {
if (!autumnClient) return;
if (this.isPreviewTeam(teamId)) return;
// Fast path: team is already fully provisioned.
if (this.ensuredTeams.has(teamId)) return;