1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

Updated customer metadata when updating to use bank account (#5050)

This commit is contained in:
Conner Turnbull 2024-11-20 09:32:53 -05:00 committed by GitHub
parent 5227ee7d90
commit 77cde50ee1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -768,8 +768,9 @@ public class SubscriberService(
{
var metadata = customer.Metadata ?? new Dictionary<string, string>();
if (metadata.ContainsKey(BraintreeCustomerIdKey))
if (metadata.TryGetValue(BraintreeCustomerIdKey, out var value))
{
metadata[BraintreeCustomerIdOldKey] = value;
metadata[BraintreeCustomerIdKey] = null;
await stripeAdapter.CustomerUpdateAsync(customer.Id, new CustomerUpdateOptions