diff --git a/app/controllers/data_files_controller.rb b/app/controllers/data_files_controller.rb index 0d0b66e81f..6143dfcee1 100644 --- a/app/controllers/data_files_controller.rb +++ b/app/controllers/data_files_controller.rb @@ -169,7 +169,7 @@ def extract_samples SampleDataPersistJob.new(@data_file, @sample_type, User.current_user, assay_ids: params["assay_ids"]).queue_job flash[:notice] = 'Started creating extracted samples' else - @data_file.sample_persistence_task.update(status: "cancelled") if @data_file.sample_persistence_task&.success? + @data_file.sample_persistence_task.destroy if @data_file.sample_persistence_task&.success? SampleDataExtractionJob.new(@data_file, @sample_type).queue_job end