mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-07-13 03:45:50 +00:00
refactor(devices): update device payment status in background task and remove unused serializer field 🔨
This commit is contained in:
@ -72,6 +72,9 @@ def update_expired_payments(timestamp: int):
|
||||
logger.info(f"Found {count} payments to expire.")
|
||||
|
||||
for payment in expired_payments_qs:
|
||||
for device in payment.devices.all():
|
||||
device.has_a_pending_payment = False
|
||||
device.save()
|
||||
if (
|
||||
payment.user
|
||||
and payment.user.mobile
|
||||
|
Reference in New Issue
Block a user