mirror of
https://github.com/bitwarden/server.git
synced 2024-12-23 17:07:42 +01:00
Fix the Bug for org without subscription (#4213)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
parent
d9aa27d4cb
commit
e0f7d212c8
@ -436,12 +436,16 @@ public class ProviderService : IProviderService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var subscriptionItem = await GetSubscriptionItemAsync(organization.GatewaySubscriptionId, GetStripeSeatPlanId(organization.PlanType));
|
if (!string.IsNullOrWhiteSpace(organization.GatewaySubscriptionId))
|
||||||
|
{
|
||||||
|
var subscriptionItem = await GetSubscriptionItemAsync(organization.GatewaySubscriptionId,
|
||||||
|
GetStripeSeatPlanId(organization.PlanType));
|
||||||
var extractedPlanType = PlanTypeMappings(organization);
|
var extractedPlanType = PlanTypeMappings(organization);
|
||||||
if (subscriptionItem != null)
|
if (subscriptionItem != null)
|
||||||
{
|
{
|
||||||
await UpdateSubscriptionAsync(subscriptionItem, GetStripeSeatPlanId(extractedPlanType), organization);
|
await UpdateSubscriptionAsync(subscriptionItem, GetStripeSeatPlanId(extractedPlanType), organization);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
await _organizationRepository.UpsertAsync(organization);
|
await _organizationRepository.UpsertAsync(organization);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user