mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 18:11:30 +01:00
refactor: search in list
This commit is contained in:
parent
5b6e11a621
commit
53a95ccc11
@ -87,14 +87,14 @@ async def extensions_install(
|
||||
]
|
||||
|
||||
for e in installable_exts:
|
||||
installed_ext = [ie for ie in installed_exts if e.id == ie.id]
|
||||
if len(installed_ext) != 0:
|
||||
e.installed_release = installed_ext[0].installed_release
|
||||
installed_ext = next((ie for ie in installed_exts if e.id == ie.id), None)
|
||||
if installed_ext:
|
||||
e.installed_release = installed_ext.installed_release
|
||||
# use the installed extension values
|
||||
e.name = installed_ext[0].name
|
||||
e.short_description = installed_ext[0].short_description
|
||||
e.icon = installed_ext[0].icon
|
||||
e.icon_url = installed_ext[0].icon_url
|
||||
e.name = installed_ext.name
|
||||
e.short_description = installed_ext.short_description
|
||||
e.icon = installed_ext.icon
|
||||
e.icon_url = installed_ext.icon_url
|
||||
|
||||
except Exception as ex:
|
||||
logger.warning(ex)
|
||||
|
Loading…
Reference in New Issue
Block a user