mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-07-07 12:16:30 +00:00
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
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Has been cancelled
This commit is contained in:
@ -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