From 591b88d2f367ba4833d586d2f32830e0c74e9acc Mon Sep 17 00:00:00 2001 From: f Date: Thu, 20 Apr 2023 21:14:12 -0300 Subject: [PATCH] fix: usar los posts indexados para obtener la diferencia --- app/models/site/build_stats.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/site/build_stats.rb b/app/models/site/build_stats.rb index d5b0c1ad..d5461bcf 100644 --- a/app/models/site/build_stats.rb +++ b/app/models/site/build_stats.rb @@ -45,7 +45,7 @@ class Site # # @return [Boolean] def awaiting_publication? - waiting? && updated_at > (build_stats.jekyll.where(status: true).last&.created_at || updated_at) + waiting? && updated_at >= (indexed_posts.order(updated_at: :desc).select(:created_at).first&.created_at || 1.second.ago) end end end