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;
This commit is contained in:
Egor Pavlovich Gorbunov 2025-06-22 20:29:53 +03:00
parent d1f385e387
commit 0e9f16d7d0

View file

@ -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)