FIX: post_actions from deleted users should not show up in the old flags section
This commit is contained in:
parent
ec30086dea
commit
458c0c67a3
|
@ -110,6 +110,8 @@ module FlagQuery
|
|||
post_actions = PostAction.flags
|
||||
.joins("INNER JOIN posts ON posts.id = post_actions.post_id")
|
||||
.joins("INNER JOIN topics ON topics.id = posts.topic_id")
|
||||
.joins("LEFT JOIN users ON users.id = posts.user_id")
|
||||
.where("users.id IS NOT NULL")
|
||||
|
||||
if filter == "old"
|
||||
post_actions.where("post_actions.disagreed_at IS NOT NULL OR
|
||||
|
|
Loading…
Reference in New Issue