From 3a49902a7cb803db2c5fdc355c21b5d7b964c652 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sun, 30 Apr 2023 09:32:15 -0700 Subject: [PATCH] Fix invoice-follower output logs and order_update --- api/management/commands/follow_invoices.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/management/commands/follow_invoices.py b/api/management/commands/follow_invoices.py index 413a2f73..be70b53f 100644 --- a/api/management/commands/follow_invoices.py +++ b/api/management/commands/follow_invoices.py @@ -65,20 +65,22 @@ class Command(BaseCommand): # Only save the hold_payments that change (otherwise this function does not scale) changed = not old_status == new_status + if changed: # self.handle_status_change(hold_lnpayment, old_status) - self.update_order_status(hold_lnpayment) hold_lnpayment.status = new_status + self.update_order_status(hold_lnpayment) hold_lnpayment.save() # Report for debugging - new_status = LNPayment.Status(hold_lnpayment.status).label + old = LNPayment.Status(old_status).label + new = LNPayment.Status(hold_lnpayment.status).label debug["invoices"].append( { idx: { "payment_hash": str(hold_lnpayment.payment_hash), - "old_status": old_status, - "new_status": new_status, + "old_status": old, + "new_status": new, } } )