fix(tasks): include paid filter in expired topups query to prevent notifications for paid topups 🐛
This commit is contained in:
+1
-1
@@ -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():
|
||||||
|
|||||||
Reference in New Issue
Block a user