aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/user/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user/user.go b/models/user/user.go
index 8efd51c9be..57a7fcadfa 100644
--- a/models/user/user.go
+++ b/models/user/user.go
@@ -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