A platform for community discussion. Free, open, simple.
FIX: Don't return the last post we already have when paginating /posts (#30991)
Rafael dos Santos Silva59a677584896
diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rbindex f418065abfb..97112c331e7 100644--- a/app/controllers/posts_controller.rb+++ b/app/controllers/posts_controller.rb@@ -107,7 +107,7 @@ class PostsController < ApplicationController@use_canonical = trueend- posts = posts.where("posts.id <= ?", last_post_id) if last_post_id+ posts = posts.where("posts.id < ?", last_post_id) if last_post_idposts = posts.to_a