1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-05 18:50:35 -05:00

Add invoice null check (#5642)

This commit is contained in:
Alex Morask 2025-04-11 09:34:51 -04:00 committed by GitHub
parent d553d52c93
commit dff00e613d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,7 +93,9 @@ public class OrganizationBillingService(
var isOnSecretsManagerStandalone = await IsOnSecretsManagerStandalone(organization, customer, subscription); var isOnSecretsManagerStandalone = await IsOnSecretsManagerStandalone(organization, customer, subscription);
var invoice = await stripeAdapter.InvoiceGetAsync(subscription.LatestInvoiceId, new InvoiceGetOptions()); var invoice = !string.IsNullOrEmpty(subscription.LatestInvoiceId)
? await stripeAdapter.InvoiceGetAsync(subscription.LatestInvoiceId, new InvoiceGetOptions())
: null;
return new OrganizationMetadata( return new OrganizationMetadata(
isEligibleForSelfHost, isEligibleForSelfHost,