Skip to content

Commit

Permalink
Fix billing flag condition, fix customer check condition
Browse files Browse the repository at this point in the history
  • Loading branch information
MauAraujo committed May 15, 2024
1 parent a29f0b1 commit db0df3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions dashboard/src/main/home/app-dashboard/apps/Apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ const Apps: React.FC = () => {
/>
)}
{!currentProject?.sandbox_enabled &&
currentProject?.billing_enabled &&
trialExpired &&
!hasPaymentEnabled &&
showBillingModal && (
Expand Down
3 changes: 3 additions & 0 deletions internal/billing/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ func (m LagoClient) CheckIfCustomerExists(ctx context.Context, projectID uint, e
customerID := m.generateLagoID(CustomerIDPrefix, projectID, enableSandbox)
_, lagoErr := m.client.Customer().Get(ctx, customerID)
if lagoErr != nil {
if lagoErr.ErrorCode == "customer_not_found" {
return false, nil
}
return exists, telemetry.Error(ctx, span, fmt.Errorf(lagoErr.ErrorCode), "failed to get customer")
}

Expand Down

0 comments on commit db0df3b

Please sign in to comment.