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:
+8
-5
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user