mirror of https://github.com/go-gitea/gitea.git
Fix update user bug (#18251)
This commit is contained in:
parent
c719841f0d
commit
37abfcaf8a
|
@ -1095,7 +1095,7 @@ func updateUser(e Engine, u *User, changePrimaryEmail bool) error {
|
||||||
if _, err := e.Insert(&emailAddress); err != nil {
|
if _, err := e.Insert(&emailAddress); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else if _, err := e.ID(emailAddress).Cols("is_primary").Update(&EmailAddress{
|
} else if _, err := e.ID(emailAddress.ID).Cols("is_primary").Update(&EmailAddress{
|
||||||
IsPrimary: true,
|
IsPrimary: true,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue