Skip to content

Commit 4bb6036

Browse files
feat: fix 用户修改属性失败的BUG
1 parent f54b9e3 commit 4bb6036

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/service/v1/user/user.go

+5
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ func (u *service) Update(name string, us *v1User.User, options common.DBOptions)
8383
us.UpdateAt = time.Now()
8484
if us.Mfa.Enable == false {
8585
us.Mfa.Secret = ""
86+
err = db.UpdateField(us, "Mfa", us.Mfa)
87+
if err != nil {
88+
return err
89+
}
8690
}
91+
8792
return db.Update(us)
8893
}
8994

0 commit comments

Comments
 (0)