From e6fe0773a43aa3d2674ce2dc02717698b90fbbda Mon Sep 17 00:00:00 2001 From: jpyoung3 <809608046@qq.com> Date: Mon, 4 Nov 2024 14:50:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=89=E8=A3=85=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=88=A4=E6=96=ADtag=E7=89=88=E6=9C=AC=E4=B8=8E=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E8=AE=BE=E5=AE=9A=E6=9C=80=E5=A4=A7=E7=89=88=E6=9C=AC?= =?UTF-8?q?(closed=20#2482)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/backend/components/collections/plugin.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/backend/components/collections/plugin.py b/apps/backend/components/collections/plugin.py index 06c9906094..7b8f4ed290 100644 --- a/apps/backend/components/collections/plugin.py +++ b/apps/backend/components/collections/plugin.py @@ -293,14 +293,15 @@ def _execute(self, data, parent_data, common_data: PluginCommonData): ) # 如果版本号匹配到标签名称,取对应标签下的真实版本号 version_str = getattr(package, "version", "") - golbal_version_config = models.GlobalSettings.get_config( + if version_str in tag_name__obj_map: + version_str = tag_name__obj_map[package.version].target_version + + global_version_config = models.GlobalSettings.get_config( models.GlobalSettings.KeyEnum.PLUGIN_VERSION_CONFIG.value ) biz_version = None - if version_str in tag_name__obj_map: - version_str = tag_name__obj_map[package.version].target_version - if bk_biz_id in golbal_version_config: - biz_version_config = golbal_version_config[bk_biz_id] + if bk_biz_id in global_version_config: + biz_version_config = global_version_config[bk_biz_id] for plugin_name, plugin_version in biz_version_config.items(): if plugin_name == package.project: biz_version = plugin_version