mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-03 19:24:48 +08:00
Fix text extraction for cloned assets [SCI-11618] (#8279)
This commit is contained in:
parent
75bf271ab0
commit
848e4960d3
1 changed files with 2 additions and 1 deletions
|
@ -165,10 +165,11 @@ class Asset < ApplicationRecord
|
|||
new_blob = nil
|
||||
|
||||
blob.open do |tmp_file|
|
||||
# Analyzed flag should be removed in order to run a new text extraction job needed for search
|
||||
new_blob = ActiveStorage::Blob.create_and_upload!(
|
||||
io: tmp_file,
|
||||
filename: blob.filename,
|
||||
metadata: (metadata || blob.metadata)
|
||||
metadata: (metadata || blob.metadata).except(:analyzed)
|
||||
)
|
||||
|
||||
attach_method.call(new_blob)
|
||||
|
|
Loading…
Reference in a new issue