DEV: Remove redundant line of code (#22734)

No need for `limit(1)` when we are already calling `first`
This commit is contained in:
Alan Guo Xiang Tan 2023-07-21 11:50:07 +08:00 committed by GitHub
parent 40bedea75a
commit 1f2213414a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -310,7 +310,6 @@ class PostDestroyer
.where.not(user_id: nil) .where.not(user_id: nil)
.where.not(post_type: Post.types[:whisper]) .where.not(post_type: Post.types[:whisper])
.order("created_at desc") .order("created_at desc")
.limit(1)
.first .first
if last_post.present? if last_post.present?