From 7328d222a08ee66116d8322712a35e419fe10182 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Wed, 4 Jan 2023 11:28:43 +0000 Subject: [PATCH] prusnak's suggestion --- lnbits/extensions/shop/tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lnbits/extensions/shop/tasks.py b/lnbits/extensions/shop/tasks.py index 3dc460aa9..621e4fae4 100644 --- a/lnbits/extensions/shop/tasks.py +++ b/lnbits/extensions/shop/tasks.py @@ -23,7 +23,10 @@ async def wait_for_paid_invoices(): async def on_invoice_paid(payment: Payment) -> None: - if payment.extra and payment.extra.get("tag") != "shop": + if not payment.extra: + return + + if payment.extra.get("tag") != "shop": return order = await get_shop_order_invoiceid(payment.payment_hash)