From 0e9f16d7d084a90f51b735be46efb91a96a88463 Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Sun, 22 Jun 2025 20:29:53 +0300 Subject: [PATCH] Features: 1) Add condition to check `notify` flag before sending balance deposit email; Fixes: 1) Ensure emails are only sent when notification flag is enabled; Extra: None; --- payments/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/payments/signals.py b/payments/signals.py index 079c5df9..7f94297a 100644 --- a/payments/signals.py +++ b/payments/signals.py @@ -25,5 +25,5 @@ def process_transaction_changes(instance, created, **_kwargs): status = instance.process.get("status", "").lower() success = instance.process.get("success", False) - if "success" in status or success: + if ("success" in status or success) and (instance.process.get("notify", False)): balance_deposit_email.delay(instance.uuid)