From 4a2b8ab1afaee3fc05ed50d2259ee364495ba412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Wed, 4 Jan 2023 13:51:18 +0100 Subject: [PATCH] add prusnak suggestion --- lnbits/extensions/tpos/tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lnbits/extensions/tpos/tasks.py b/lnbits/extensions/tpos/tasks.py index ea414072..f1417810 100644 --- a/lnbits/extensions/tpos/tasks.py +++ b/lnbits/extensions/tpos/tasks.py @@ -20,7 +20,9 @@ async def wait_for_paid_invoices(): async def on_invoice_paid(payment: Payment) -> None: - if not payment.extra or payment.extra.get("tag") != "tpos": + if not payment.extra: + return + if payment.extra.get("tag") != "tpos": return tipAmount = payment.extra.get("tipAmount")