From 30cb4716297b5ce255e03dadd6455224dd67d0a9 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:52:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E7=89=88=E6=9C=AC=20(#390)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/upgrade.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/app/service/upgrade.go b/backend/app/service/upgrade.go index bf25fcf9c4a4..0a669f505b1a 100644 --- a/backend/app/service/upgrade.go +++ b/backend/app/service/upgrade.go @@ -60,7 +60,12 @@ func (u *UpgradeService) SearchUpgrade() (*dto.UpgradeInfo, error) { upgrade.NewVersion = newerVersion } } - notes, err := u.loadReleaseNotes(fmt.Sprintf("%s/%s/%s/release/1panel-%s-release-notes", global.CONF.System.RepoUrl, global.CONF.System.Mode, upgrade.LatestVersion, upgrade.LatestVersion)) + itemVersion := upgrade.LatestVersion + if upgrade.NewVersion != "" { + itemVersion = upgrade.NewVersion + } + notes, err := u.loadReleaseNotes(fmt.Sprintf("%s/%s/%s/release/1panel-%s-release-notes", global.CONF.System.RepoUrl, global.CONF.System.Mode, itemVersion, itemVersion)) + if err != nil { return nil, fmt.Errorf("load relase-notes of version %s failed, err: %v", latestVersion, err) }