diff --git a/lnbits/app.py b/lnbits/app.py index d21fb5bdc..1d623b1c6 100644 --- a/lnbits/app.py +++ b/lnbits/app.py @@ -151,7 +151,7 @@ def check_installed_extension(ext: InstallableExtension) -> bool: if ext.zip_path not in zip_files: ext.download_archive() ext.extract_archive() - + return False diff --git a/lnbits/core/crud.py b/lnbits/core/crud.py index 0c031cd15..4921436b0 100644 --- a/lnbits/core/crud.py +++ b/lnbits/core/crud.py @@ -138,10 +138,8 @@ async def get_installed_extension(ext_id: str, conn: Optional[Connection] = None "SELECT * FROM installed_extensions WHERE id = ?", (ext_id,), ) - if not row: - return None - return dict(row) + return dict(row) if row else None async def get_installed_extensions( @@ -159,9 +157,7 @@ async def get_inactive_extensions(*, conn: Optional[Connection] = None) -> List[ """SELECT id FROM installed_extensions WHERE NOT active""", (), ) - return ( - [ext[0] for ext in inactive_extensions] if len(inactive_extensions) != 0 else [] - ) + return [ext[0] for ext in inactive_extensions] async def update_user_extension(