From 5309ca58d93cd00e7ba1f5edfd9aaad7d06d922e Mon Sep 17 00:00:00 2001 From: Alex Goth Date: Mon, 11 Nov 2024 21:49:16 +0100 Subject: [PATCH] fix: map NoAccessValue on API --- openmeter/entitlement/driver/parser.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openmeter/entitlement/driver/parser.go b/openmeter/entitlement/driver/parser.go index e7c864539..c5bd03587 100644 --- a/openmeter/entitlement/driver/parser.go +++ b/openmeter/entitlement/driver/parser.go @@ -161,6 +161,10 @@ func MapEntitlementValueToAPI(entitlementValue entitlement.EntitlementValue) (ap return api.EntitlementValue{ HasAccess: ent.HasAccess(), }, nil + case *entitlement.NoAccessValue: + return api.EntitlementValue{ + HasAccess: false, + }, nil default: return api.EntitlementValue{}, errors.New("unknown entitlement type") }