Explorar o código

Set the validation error when err == nil too

gabrielseibel1 %!s(int64=2) %!d(string=hai) anos
pai
achega
9ddc1222db
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pro/license.go

+ 1 - 1
pro/license.go

@@ -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()