From c6f5d09ff9a6a4aaeadb647d15426858e4ae68f6 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Fri, 8 Aug 2025 14:23:31 +0200 Subject: [PATCH] fix: do not save license key when renewing if the expiry date is earlier than that of the current key (#6346) * fix: do not save license key when renewing if the expiry date is earlier than that of the current key * tmp ref * final ref --- backend/ee-repo-ref.txt | 2 +- frontend/src/lib/components/InstanceSetting.svelte | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 885287c8e4..d49114326a 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -287f4136a1573eb33ae4b1aae257416aee4ed767 \ No newline at end of file +3c4027125e0b512b7d322374e83594cd776a9086 \ No newline at end of file diff --git a/frontend/src/lib/components/InstanceSetting.svelte b/frontend/src/lib/components/InstanceSetting.svelte index f724e97a1a..3560a6119a 100644 --- a/frontend/src/lib/components/InstanceSetting.svelte +++ b/frontend/src/lib/components/InstanceSetting.svelte @@ -84,6 +84,12 @@ latestKeyRenewalAttempt = await SettingService.getLatestKeyRenewalAttempt() } + async function reloadLicenseKey() { + $values['license_key'] = await SettingService.getGlobal({ + key: 'license_key' + }) + } + if (setting.key == 'license_key') { reloadKeyrenewalAttemptInfo() } @@ -95,11 +101,11 @@ licenseKey: $values['license_key'] || undefined }) sendUserToast('Key renewal successful') - reloadKeyrenewalAttemptInfo() + reloadLicenseKey() } catch (err) { - latestKeyRenewalAttempt = await SettingService.getLatestKeyRenewalAttempt() throw err } finally { + reloadKeyrenewalAttemptInfo() renewing = false } }