diff --git a/app/services/post_service.rb b/app/services/post_service.rb index 4631a9a4..d59bc8c0 100644 --- a/app/services/post_service.rb +++ b/app/services/post_service.rb @@ -74,7 +74,7 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do # { uuid => 2, uuid => 1, uuid => 0 } def reorder reorder = params.require(:post).permit(reorder: {})&.dig(:reorder)&.transform_values(&:to_i) - posts = site.posts(lang: locale).where(uuid: reorder.keys) + posts = site.indexed_posts(locale: locale).where(post_id: reorder.keys).map(&:post) files = posts.map do |post| next unless post.attribute? :order