mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
Merge pull request #1228 from okriuchykhin/ok_SCI_2585
Fix inventory cell copy with file attached [SCI-2585]
This commit is contained in:
commit
95b832800f
1 changed files with 1 additions and 15 deletions
|
@ -88,22 +88,8 @@ module RepositoryActions
|
||||||
new_asset.file.reprocess!(:medium)
|
new_asset.file.reprocess!(:medium)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Clone extracted text data if it exists
|
new_asset.post_process_file(new_asset.team)
|
||||||
if old_asset.asset_text_datum
|
|
||||||
AssetTextDatum.create(data: new_asset.data, asset: new_asset)
|
|
||||||
end
|
|
||||||
|
|
||||||
# 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
|
new_asset
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue