1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-03 02:32:16 -05:00

fix null refs on free org create

This commit is contained in:
Kyle Spearrin 2017-08-30 15:03:05 -04:00
parent 8b947cafaf
commit ff22e00ec5

View File

@ -527,11 +527,11 @@ namespace Bit.Core.Services
UseTotp = plan.UseTotp,
SelfHost = plan.SelfHost,
Plan = plan.Name,
Gateway = GatewayType.Stripe,
Gateway = plan.Type == PlanType.Free ? null : (GatewayType?)GatewayType.Stripe,
GatewayCustomerId = customer?.Id,
GatewaySubscriptionId = subscription?.Id,
Enabled = true,
ExpirationDate = subscription.CurrentPeriodEnd,
ExpirationDate = subscription?.CurrentPeriodEnd,
LicenseKey = CoreHelpers.SecureRandomString(20),
CreationDate = DateTime.UtcNow,
RevisionDate = DateTime.UtcNow