mirror of
https://github.com/go-gitea/gitea
synced 2024-11-12 13:14:24 +00:00
Fix update user bug (#18250)
This commit is contained in:
parent
ba9e4e2570
commit
67d73882f4
@ -855,7 +855,7 @@ func updateUser(ctx context.Context, 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
Block a user