Fix workspace resolver when billing is not enabled (#17333)

This commit is contained in:
Weiko
2026-01-22 13:33:29 +01:00
committed by GitHub
parent 5a94ef7dbb
commit 4c565425c5
@@ -184,9 +184,11 @@ export class BillingSubscriptionService {
this.twentyConfigService.get('ENTERPRISE_KEY'),
);
const entitlements = await this.billingEntitlementRepository.find({
where: { workspaceId },
});
const entitlements = isBillingEnabled
? await this.billingEntitlementRepository.find({
where: { workspaceId },
})
: [];
const entitlementsByKey = entitlements.reduce(
(acc, entitlement) => {