Fix workspace resolver when billing is not enabled (#17333)
This commit is contained in:
+5
-3
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user