mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-22 22:25:47 +01:00
fix: add module_name
property
This commit is contained in:
parent
6ec1a668ae
commit
51c8e183d1
1 changed files with 10 additions and 1 deletions
|
@ -25,9 +25,17 @@ class Extension(NamedTuple):
|
|||
hidden: bool = False
|
||||
migration_module: Optional[str] = None
|
||||
db_name: Optional[str] = None
|
||||
version: Optional[str] = ""
|
||||
hash: Optional[str] = ""
|
||||
|
||||
@property
|
||||
def module_name(self):
|
||||
return (
|
||||
f"lnbits.extensions.{self.code}"
|
||||
if self.hash == ""
|
||||
else f"lnbits.upgrades.{self.code}-{self.hash}.{self.code}"
|
||||
)
|
||||
|
||||
|
||||
class InstallableExtension(NamedTuple):
|
||||
id: str
|
||||
name: str
|
||||
|
@ -40,6 +48,7 @@ class InstallableExtension(NamedTuple):
|
|||
is_admin_only: bool = False
|
||||
version: Optional[int] = 0
|
||||
|
||||
|
||||
class ExtensionManager:
|
||||
def __init__(self, include_disabled_exts=False):
|
||||
self._disabled: List[str] = (
|
||||
|
|
Loading…
Add table
Reference in a new issue