From 51859a44f5672ff5584582c9cb6b3607cc40ac42 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Thu, 25 Jan 2024 10:13:04 -0300 Subject: [PATCH] feat: save only email in stripe customer update --- bd_api/apps/payment/webhooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bd_api/apps/payment/webhooks.py b/bd_api/apps/payment/webhooks.py index 4b35f9b3..0176a007 100644 --- a/bd_api/apps/payment/webhooks.py +++ b/bd_api/apps/payment/webhooks.py @@ -98,7 +98,7 @@ def update_customer(event: Event, **kwargs): account = event.customer.subscriber if account and account.email != event.data["object"]["email"]: account.email = event.data["object"]["email"] - account.save() + account.save(update_fields=["email"]) @webhooks.handler("customer.subscription.updated")