fix(tasks): include paid filter in expired topups query to prevent notifications for paid topups 🐛
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Has been cancelled

This commit is contained in:
2025-07-05 18:05:39 +05:00
parent 3dafc7d4c8
commit 63b1a6b9ef

View File

@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)
@app.task @app.task
def update_expired_topups(timestamp: int): def update_expired_topups(timestamp: int):
expired_topups_qs = Topup.objects.filter( expired_topups_qs = Topup.objects.filter(
expires_at__lte=timezone.now(), expiry_notification_sent=False expires_at__lte=timezone.now(), expiry_notification_sent=False, paid=False
).select_related("user") ).select_related("user")
with transaction.atomic(): with transaction.atomic():