Browse Source

Fix feature flag

Mauricio Araujo 2 years ago
parent
commit
f5baea7f3f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api/server/handlers/project/create.go

+ 1 - 1
api/server/handlers/project/create.go

@@ -81,7 +81,7 @@ func (p *ProjectCreateHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
 	}
 
 	// Create Stripe Customer
-	if p.Config().ServerConf.StripeSecretKey != "" && p.Config().ServerConf.StripePublishableKey != "" {
+	if p.Config().BillingManager.StripeEnabled && proj.GetFeatureFlag(models.BillingEnabled, p.Config().LaunchDarklyClient) {
 		// Create billing customer for project and set the billing ID
 		billingID, err := p.Config().BillingManager.StripeClient.CreateCustomer(ctx, user.Email, proj.ID, proj.Name)
 		if err != nil {