mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-23 14:40:47 +01:00
refactor: remove redundant changes
This commit is contained in:
parent
ea31e148ae
commit
fa5d824eea
2 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue