fix(billing) - query timeout (#20669)

Sonarly context : https://sonarly.com/issue/33412
Sentry issue :
https://twenty-v7.sentry.io/issues/7454613767/?project=4507072499810304
This commit is contained in:
Etienne
2026-05-18 14:29:47 +02:00
committed by GitHub
parent d5e65c563e
commit fc74938d7b
@@ -56,12 +56,15 @@ export class BillingUsageService {
return true;
}
const billingSubscription =
await this.billingSubscriptionService.getCurrentBillingSubscription({
workspaceId,
});
const { billingSubscription } =
await this.workspaceCacheService.getOrRecompute(workspaceId, [
'billingSubscription',
]);
return !!billingSubscription;
return (
isDefined(billingSubscription) &&
billingSubscription.status !== SubscriptionStatus.Canceled
);
}
async getResourceCreditProductUsage(