DEV: Remove redundant line of code (#22734)
No need for `limit(1)` when we are already calling `first`
This commit is contained in:
parent
40bedea75a
commit
1f2213414a
|
@ -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?
|
||||||
|
|
Loading…
Reference in New Issue