From 8ded4b2e58768deec919467aff70dce0957d603b Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Fri, 25 Oct 2024 13:04:42 -0300 Subject: [PATCH] FIX: Use present? instead of invalid exists? (#869) --- lib/summarization/entry_point.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/summarization/entry_point.rb b/lib/summarization/entry_point.rb index f3d00939..a9be9f6e 100644 --- a/lib/summarization/entry_point.rb +++ b/lib/summarization/entry_point.rb @@ -55,7 +55,7 @@ module DiscourseAi SiteSetting.ai_summarize_max_hot_topics_gists_per_batch > 0 && post.topic hot_score = TopicHotScore.find_by(topic: post.topic) - if hot_score.exists? && hot_score.updated_at > 1.day.ago + if hot_score.present? && hot_score.updated_at > 1.day.ago Jobs.enqueue(:update_hot_topic_gist, topic_id: post&.topic_id) end end