From ff9f5c58721a14a9e545082763f9fa7ffca57ab0 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Mon, 2 Oct 2023 22:57:00 +0900 Subject: [PATCH] Fix: Fix image --- backend/app/jobs/image_convert_job.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/app/jobs/image_convert_job.rb b/backend/app/jobs/image_convert_job.rb index 05f0659..36eefcd 100644 --- a/backend/app/jobs/image_convert_job.rb +++ b/backend/app/jobs/image_convert_job.rb @@ -40,7 +40,12 @@ def perform(chart_name, image_file_id, type) ImageConvertJob.perform_later(chart_name, resource, :background_v3) image_file.delete when :background_v3 - ImageConvertJob.perform_later(chart_name, resource, :background_v1) + chart = Chart.find_by(name: chart_name) + ImageConvertJob.perform_later( + chart_name, + chart.resources[:cover], + :background_v1 + ) end end end