Set the validation error when err == nil too (#2575)

This commit is contained in:
Gabriel de Souza Seibel 2023-09-14 09:59:20 -03:00 committed by GitHub
parent 900949dc39
commit ad551a0e6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,8 +51,8 @@ func ValidateLicense() (err error) {
defer func() {
if err != nil {
err = fmt.Errorf("%w: %s", errValidation, err.Error())
servercfg.ErrLicenseValidation = err
}
servercfg.ErrLicenseValidation = err
}()
licenseKeyValue := servercfg.GetLicenseKey()