From 040fc3e679cee378fa6fead7fab9a6e9ff37a5fd Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sun, 24 Jul 2022 04:29:13 -0700 Subject: [PATCH] Fix payments_cleansin for onchain payments with no order key --- api/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tasks.py b/api/tasks.py index a0e790a6..5557d362 100644 --- a/api/tasks.py +++ b/api/tasks.py @@ -203,7 +203,7 @@ def payments_cleansing(): # same for onchain payments queryset = OnchainPayment.objects.filter(Q(status__in=[OnchainPayment.Status.CANCE, OnchainPayment.Status.CREAT]), - Q(order_paid_TX__expires_at__lt=finished_time)) + Q(order_paid_TX__expires_at__lt=finished_time)|Q(order_paid_TX__isnull=True)) # And do not have an active trade, any past contract or any reward. deleted_onchainpayments = []