fix: check the settings for extension installed (#2764)

This commit is contained in:
Vlad Stan
2024-11-06 12:07:12 +02:00
committed by GitHub
parent ba5f79da2d
commit aced333c0b
4 changed files with 7 additions and 8 deletions
+1 -6
View File
@@ -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():