Fix preview generation [SCI-8855]

This commit is contained in:
Anton 2023-07-17 12:06:37 +02:00
parent 4808f6438c
commit bd1e81f894

View file

@ -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