From 2f4521bedb0bfc13c76c87c1310ea6912cf45377 Mon Sep 17 00:00:00 2001 From: Eric O Date: Mon, 23 Dec 2024 23:48:42 -0500 Subject: [PATCH] Update RequestDerivativesJob to set perform_derivative_processing to false if no derivatives are needed --- app/jobs/request_derivatives_job.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/jobs/request_derivatives_job.rb b/app/jobs/request_derivatives_job.rb index 126ea8abe..8bb7798d4 100644 --- a/app/jobs/request_derivatives_job.rb +++ b/app/jobs/request_derivatives_job.rb @@ -6,7 +6,13 @@ def perform(digital_object_pid) return unless eligible_asset?(asset) requested_derivatives = required_derivatives_for_asset(asset) - return if requested_derivatives.empty? + + # If no derivatives are needed, then we'll set perform_derivative_processing to false and return + if requested_derivatives.empty? + asset.perform_derivative_processing = false + asset.save + return + end if requested_derivatives.present? RestClient.post(