FIX: Don't try to generate embeddings of posts in deleted topics (#433)

This commit is contained in:
Rafael dos Santos Silva 2024-01-18 16:10:25 -03:00 committed by GitHub
parent f65314bdab
commit d4e23e0df6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -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?