Skip to content

Commit 5bf02cd

Browse files
lunnyStelios Malathouras
authored and
Stelios Malathouras
committed
Fix update user bug (go-gitea#18250)
1 parent e1925ea commit 5bf02cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/user/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ func updateUser(ctx context.Context, u *User, changePrimaryEmail bool) error {
855855
if _, err := e.Insert(&emailAddress); err != nil {
856856
return err
857857
}
858-
} else if _, err := e.ID(emailAddress).Cols("is_primary").Update(&EmailAddress{
858+
} else if _, err := e.ID(emailAddress.ID).Cols("is_primary").Update(&EmailAddress{
859859
IsPrimary: true,
860860
}); err != nil {
861861
return err

0 commit comments

Comments
 (0)