From 498c8cc5ad5653631b7d8b9d3133111eb4ce3832 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 64e689b6..63761bae 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? - updated_at > (build_stats.jekyll.where(status: true).last&.created_at || updated_at) + waiting? && updated_at >= (indexed_posts.order(updated_at: :desc).select(:updated_at).first&.updated_at || 1.second.ago) end end end