mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Fix preview generation [SCI-8855]
This commit is contained in:
parent
4808f6438c
commit
bd1e81f894
1 changed files with 2 additions and 1 deletions
|
@ -29,7 +29,8 @@ module ActiveStorage
|
|||
|
||||
preview_exists =
|
||||
if @blob.variable?
|
||||
@blob.service.exist?(@blob.representation(params['variation_key']).key)
|
||||
rep_key = @blob.representation(params['variation_key']).key
|
||||
rep_key && @blob.service.exist?(rep_key)
|
||||
else
|
||||
@blob.preview(params['variation_key']).image.attached?
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue