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
This commit is contained in:
hugocasa
2025-08-08 14:23:31 +02:00
committed by GitHub
parent 73c19f56eb
commit c6f5d09ff9
2 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
287f4136a1573eb33ae4b1aae257416aee4ed767
3c4027125e0b512b7d322374e83594cd776a9086
@@ -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
}
}