From 42ce72170c75ff3f30fa2e54b2ede15bb10cd589 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Mon, 2 Jul 2018 12:58:49 +0200 Subject: [PATCH] Fix inventory cell copy with file attached [SCI-2585] --- .../repository_actions/duplicate_cell.rb | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/app/services/repository_actions/duplicate_cell.rb b/app/services/repository_actions/duplicate_cell.rb index c70a5d0ad..c6a8478dc 100644 --- a/app/services/repository_actions/duplicate_cell.rb +++ b/app/services/repository_actions/duplicate_cell.rb @@ -88,22 +88,8 @@ module RepositoryActions new_asset.file.reprocess!(:medium) end - # Clone extracted text data if it exists - if old_asset.asset_text_datum - AssetTextDatum.create(data: new_asset.data, asset: new_asset) - end + new_asset.post_process_file(new_asset.team) - # Update estimated size of cloned asset - # (& file_present flag) - new_asset.update( - estimated_size: old_asset.estimated_size, - file_present: true - ) - - # Update team's space taken - @team.reload - @team.take_space(new_asset.estimated_size) - @team.save! new_asset end end