Skip to content

Commit

Permalink
feat: 安装预设插件锁定版本 (closed #2482)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpyoung3 committed Dec 19, 2024
1 parent cd69e84 commit a807d12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/node_man/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ class KeyEnum(Enum):
ADD_HOST_BIZ_BLACKLIST = "ADD_HOST_BIZ_BLACKLIST"
# CMDB内置云区域IDS
CMDB_INTERNAL_CLOUD_IDS = "CMDB_INTERNAL_CLOUD_IDS"
# 业务最大插件版本
PLUGIN_VERSION_CONFIG = "PLUGIN_VERSION_CONFIG"

key = models.CharField(_("键"), max_length=255, db_index=True, primary_key=True)
v_json = JSONField(_("值"))
Expand All @@ -193,9 +195,7 @@ def map_values(self, objs, source, target):

def fetch_isp(self):
isps = dict(GlobalSettings.objects.filter(key="isp").values_list("key", "v_json")).get("isp", [])
result = self.map_values(
isps, lambda isp: isp["isp"], lambda isp: {"isp_name": isp["isp_name"]}
)
result = self.map_values(isps, lambda isp: isp["isp"], lambda isp: {"isp_name": isp["isp_name"]})

return result

Expand Down

0 comments on commit a807d12

Please sign in to comment.