mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 10:14:17 +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 =
|
preview_exists =
|
||||||
if @blob.variable?
|
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
|
else
|
||||||
@blob.preview(params['variation_key']).image.attached?
|
@blob.preview(params['variation_key']).image.attached?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue