Skip to content

Commit

Permalink
Destroy existing sample_persistence_task if re-extracting
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewWood94 authored and stuzart committed May 31, 2024
1 parent 624f8d6 commit 13e4647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/data_files_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 13e4647

Please sign in to comment.