Skip to content

Commit

Permalink
feat: 安装预设插件锁定版本 (closed #2482)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpyoung3 authored and wyyalt committed Dec 27, 2024
1 parent afa880c commit ad70bb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/backend/subscription/steps/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def get_matching_config_tmpl_objs(
self, os_type: str, cpu_arch: str, package: models.Packages = None, config: Dict = None
) -> List[models.PluginConfigTemplate]:
"""如果 package 是重新获取的(包括业务锁定版本和tag不存在的版本两种情况),则重新从数据库中获取配置模板"""
if not self.is_pkg_in_selected_pkg(package, self.selected_pkg_infos):
if package is not None and not self.is_pkg_in_selected_pkgs(package, self.selected_pkg_infos):
plugin_config_templates = []
for config_template in config["config_templates"]:
config_tmpl = (
Expand Down Expand Up @@ -548,7 +548,7 @@ def plugin_version_config():
return plugin_version_config

@staticmethod
def is_pkg_in_selected_pkg(package: models.Packages, selected_pkg_infos: List[Dict]) -> bool:
def is_pkg_in_selected_pkgs(package: models.Packages, selected_pkg_infos: List[Dict]) -> bool:
for pkg_info in selected_pkg_infos:
if (
package.project == pkg_info["project"]
Expand Down

0 comments on commit ad70bb8

Please sign in to comment.