Fix for wrong email query

Changing EmailAdress.OwnerId to EmailAddress.Uid should have accompanied this change
tokarchuk/v1.17
Peter Smit 10 years ago
parent 030b3d751e
commit 66e2016eeb
  1. 2
      models/user.go

@ -629,7 +629,7 @@ func GetUserIdsByNames(names []string) []int64 {
// Get all email addresses // Get all email addresses
func GetEmailAddresses(uid int64) ([]*EmailAddress, error) { func GetEmailAddresses(uid int64) ([]*EmailAddress, error) {
emails := make([]*EmailAddress, 0, 5) emails := make([]*EmailAddress, 0, 5)
err := x.Where("owner_id=?", uid).Find(&emails) err := x.Where("uid=?", uid).Find(&emails)
if err != nil { if err != nil {
return nil, err return nil, err
} }

Loading…
Cancel
Save