DEV: Remove duplicated line of code (#22733)

This commit is contained in:
Alan Guo Xiang Tan 2023-07-21 11:37:36 +08:00 committed by GitHub
parent 4ef8129bff
commit 40bedea75a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -305,7 +305,6 @@ class PostDestroyer
def make_previous_post_the_last_one
last_post =
Post
.where("topic_id = ? and id <> ?", @post.topic_id, @post.id)
.select(:created_at, :user_id, :post_number)
.where("topic_id = ? and id <> ?", @post.topic_id, @post.id)
.where.not(user_id: nil)