diff options
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/user.go b/models/user.go index 0b7af8df6d..32b9bfec9b 100644 --- a/models/user.go +++ b/models/user.go @@ -374,9 +374,9 @@ func (u *User) GetFollowers(page int) ([]*User, error) { Limit(ItemsPerPage, (page-1)*ItemsPerPage). Where("follow.follow_id=?", u.ID) if setting.UsePostgreSQL { - sess = sess.Join("LEFT", "follow", `"user".id=follow.user_id`) + sess = sess.Join("LEFT", "follow", "`user`.id=follow.user_id") } else { - sess = sess.Join("LEFT", "follow", "user.id=follow.user_id") + sess = sess.Join("LEFT", "follow", "`user`.id=follow.user_id") } return users, sess.Find(&users) } @@ -393,9 +393,9 @@ func (u *User) GetFollowing(page int) ([]*User, error) { Limit(ItemsPerPage, (page-1)*ItemsPerPage). Where("follow.user_id=?", u.ID) if setting.UsePostgreSQL { - sess = sess.Join("LEFT", "follow", `"user".id=follow.follow_id`) + sess = sess.Join("LEFT", "follow", "`user`.id=follow.follow_id") } else { - sess = sess.Join("LEFT", "follow", "user.id=follow.follow_id") + sess = sess.Join("LEFT", "follow", "`user`.id=follow.follow_id") } return users, sess.Find(&users) } |