PostReply doesn't have a primary key, so no luck here
This commit is contained in:
parent
e5c29a1dde
commit
0d66529d2b
|
@ -77,7 +77,7 @@ class PostMover
|
|||
post.is_first_post? ? create_first_post(post) : move(post)
|
||||
end
|
||||
|
||||
PostReply.where("reply_id in (:post_ids) OR post_id in (:post_ids)", post_ids: post_ids).find_each do |post_reply|
|
||||
PostReply.where("reply_id IN (:post_ids) OR post_id IN (:post_ids)", post_ids: post_ids).each do |post_reply|
|
||||
if post_reply.post && post_reply.reply && post_reply.reply.topic_id != post_reply.post.topic_id
|
||||
PostReply.delete_all(reply_id: post_reply.reply.id, post_id: post_reply.post.id)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue