diff --git a/lnbits/extensions/splitpayments/tasks.py b/lnbits/extensions/splitpayments/tasks.py index 33768805..d9f53f20 100644 --- a/lnbits/extensions/splitpayments/tasks.py +++ b/lnbits/extensions/splitpayments/tasks.py @@ -20,7 +20,7 @@ async def wait_for_paid_invoices(): async def on_invoice_paid(payment: Payment) -> None: - if payment.extra.get("tag") == "splitpayments": + if not payment.extra or payment.extra.get("tag") == "splitpayments": # already a splitted payment, ignore return diff --git a/lnbits/extensions/splitpayments/views.py b/lnbits/extensions/splitpayments/views.py index 056c7563..c33fd424 100644 --- a/lnbits/extensions/splitpayments/views.py +++ b/lnbits/extensions/splitpayments/views.py @@ -1,5 +1,4 @@ -from fastapi import Request -from fastapi.params import Depends +from fastapi import Depends, Request from fastapi.templating import Jinja2Templates from starlette.responses import HTMLResponse diff --git a/lnbits/extensions/splitpayments/views_api.py b/lnbits/extensions/splitpayments/views_api.py index 41a11c94..f83f2b4f 100644 --- a/lnbits/extensions/splitpayments/views_api.py +++ b/lnbits/extensions/splitpayments/views_api.py @@ -1,7 +1,6 @@ from http import HTTPStatus -from fastapi import Request -from fastapi.params import Depends +from fastapi import Depends, Request from starlette.exceptions import HTTPException from lnbits.core.crud import get_wallet, get_wallet_for_key diff --git a/pyproject.toml b/pyproject.toml index ff186de3..21cd025a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,7 +104,6 @@ exclude = """(?x)( | ^lnbits/extensions/offlineshop. | ^lnbits/extensions/paywall. | ^lnbits/extensions/satspay. - | ^lnbits/extensions/splitpayments. | ^lnbits/extensions/streamalerts. | ^lnbits/extensions/tpos. | ^lnbits/extensions/watchonly.