From d4e23e0df6af0d1b9c67c8a38d9582280d5bab93 Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Thu, 18 Jan 2024 16:10:25 -0300 Subject: [PATCH] FIX: Don't try to generate embeddings of posts in deleted topics (#433) --- app/jobs/regular/generate_embeddings.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/jobs/regular/generate_embeddings.rb b/app/jobs/regular/generate_embeddings.rb index 05b22ea6..d80b85e5 100644 --- a/app/jobs/regular/generate_embeddings.rb +++ b/app/jobs/regular/generate_embeddings.rb @@ -12,6 +12,7 @@ module Jobs topic = target.is_a?(Topic) ? target : target.topic post = target.is_a?(Post) ? target : target.first_post + return unless topic.present? && post.present? return if topic.private_message? && !SiteSetting.ai_embeddings_generate_for_pms return if post.raw.blank?