Skip to content

Commit

Permalink
feat: 安装插件对于不存的tag版本取最大的packageid (closed #2432)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpyoung3 committed Oct 8, 2024
1 parent bbef95b commit 8e85ed8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/backend/subscription/steps/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ def format2policy_packages_new(
plugin_name: str,
plugin_version: str,
config_templates: List[Dict[str, Any]],
plugin_os: str,
plugin_cpu_arch: str,
) -> List[Dict[str, Any]]:
latest_flag: str = "latest"
is_tag: bool = Tag.objects.filter(
Expand All @@ -302,7 +300,7 @@ def format2policy_packages_new(
os_cpu_exists = models.Packages.objects.filter(
project=plugin_name, version=plugin_version, os="linux", cpu_arch="x86_64"
).exists()
package = None
package = models.Packages.objects.none()
if not os_cpu_exists:
max_pkg_id: int = self.max_ids_by_key(
list(
Expand Down

0 comments on commit 8e85ed8

Please sign in to comment.