fix
This commit is contained in:
1 parent
0e48ea427b
commit
1c003e30a4
1 file changed
+1
-1
@@ -167,7 +167,7 @@ func (s *Service) CreditsOverview(ctx context.Context, companyID uuid.UUID, lowT
|
||||
out.IsFreePlan = ent.IsFreePlan
|
||||
out.IsPaidPlan = ent.IsPaidPlan
|
||||
// Free (0 monthly credits) is not "low credits" — AI is simply unavailable.
|
||||
out.LowCredits = ent.CanUseAI && remaining <= lowThreshold && remaining > 0
|
||||
out.LowCredits = ent.CanUseAI && remaining <= float64(lowThreshold) && remaining > 0
|
||||
// Resolve features from the plan row already loaded (avoids a second CapabilitiesForCompany
|
||||
// round-trip that re-queries company_plans + credit_balances). Still uses GetFeatureGates cache
|
||||
// and plans.features JSON overrides via decodeFeaturesJSON + ResolveEffectiveFeaturesEx.
|
||||
|
||||
Reference in new issue
Block a user