Fixed ineffectual assignments (#7555)

Don't assign values we never use.
This commit is contained in:
Christian Muehlhaeuser authored and Lunny Xiao committed 2019-07-22 17:35:53 +08:00
1 parent 9a965035f0
commit b0cd3b8ab9
2 files changed
+1 -2

No files matched your search

-1
View File
@@ -81,7 +81,6 @@ func twofaGenerateSecretAndQr(ctx *context.Context) bool {
// Filter unsafe character ':' in issuer
issuer := strings.Replace(setting.AppName+" ("+setting.Domain+")", ":", "", -1)
if otpKey == nil {
err = nil // clear the error, in case the URL was invalid
otpKey, err = totp.Generate(totp.GenerateOpts{
SecretSize: 40,
Issuer: issuer,