From e4293184d2e2f68d7b38e117c188717b1d50d89f Mon Sep 17 00:00:00 2001 From: f Date: Thu, 20 Apr 2023 21:16:12 -0300 Subject: [PATCH] fixup! 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 d5461bcf..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? - waiting? && updated_at >= (indexed_posts.order(updated_at: :desc).select(:created_at).first&.created_at || 1.second.ago) + waiting? && updated_at >= (indexed_posts.order(updated_at: :desc).select(:updated_at).first&.updated_at || 1.second.ago) end end end