Browse Source

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

Gabriel de Souza Seibel 1 year ago
parent
commit
ad551a0e6a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pro/license.go

+ 1 - 1
pro/license.go

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