fix: check the settings for extension installed (#2764)
This commit is contained in:
@@ -5,7 +5,6 @@ import hashlib
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
from typing import Any, NamedTuple, Optional
|
||||
@@ -170,7 +169,7 @@ class Extension(NamedTuple):
|
||||
name=ext_info.name,
|
||||
short_description=ext_info.short_description,
|
||||
tile=ext_info.icon,
|
||||
upgrade_hash=ext_info.hash if ext_info.module_installed else "",
|
||||
upgrade_hash=settings.extension_upgrade_hash(ext_info.id),
|
||||
)
|
||||
|
||||
|
||||
@@ -353,10 +352,6 @@ class InstallableExtension(BaseModel):
|
||||
return f"lnbits.extensions.{self.id}"
|
||||
return self.id
|
||||
|
||||
@property
|
||||
def module_installed(self) -> bool:
|
||||
return self.module_name in sys.modules
|
||||
|
||||
@property
|
||||
def has_installed_version(self) -> bool:
|
||||
if not self.ext_dir.is_dir():
|
||||
|
||||
Reference in New Issue
Block a user