From 7ad6bc80786b3987f17c28857d2fc920db9e1c40 Mon Sep 17 00:00:00 2001 From: Wieland Lindenthal Date: Mon, 12 Feb 2018 16:17:27 +0100 Subject: [PATCH] Add guard condition for TSVector support in extraction job. Remove non TSV support. --- app/workers/extract_fulltext_job.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/workers/extract_fulltext_job.rb b/app/workers/extract_fulltext_job.rb index f7cb031c71..c299b8b452 100644 --- a/app/workers/extract_fulltext_job.rb +++ b/app/workers/extract_fulltext_job.rb @@ -39,15 +39,11 @@ class ExtractFulltextJob < ApplicationJob end def perform + return unless OpenProject::Database.allows_tsv? return unless @attachment = find_attachment(@attachment_id) init - - if OpenProject::Database.allows_tsv? - update - else - attachment.update(fulltext: @text) - end + update end private