Skip to content

Commit

Permalink
Fix update user bug (#18250)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored Jan 12, 2022
1 parent ba9e4e2 commit 67d7388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ func updateUser(ctx context.Context, u *User, changePrimaryEmail bool) error {
if _, err := e.Insert(&emailAddress); err != nil {
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,
}); err != nil {
return err
Expand Down

0 comments on commit 67d7388

Please sign in to comment.