Skip to content

Commit

Permalink
todo
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyThiessen committed Dec 10, 2024
1 parent 14241ba commit 815d739
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controllers/workflow_executions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def workflow_execution_params_attributes

def samples_workflow_execution_params_attributes
[
:id,
:id, # index, increment for each one, not necissary for functionality
:sample_id,
{ samplesheet_params: {} }
]
Expand Down
10 changes: 6 additions & 4 deletions app/graphql/mutations/submit_workflow_execution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ def build_samples_workflow_executions_attributes(sample_info_list)
sample_info_list.each_with_index do |sample_info, index|
sample = IridaSchema.object_from_id(sample_info['sample_id'], { expected_type: Sample })

samplesheet_params = { 'sample' => sample.puid }
sample_info['files'].each do |file_info|
samplesheet_params[file_info['file_type']] = file_info['file_id']
end
# pass samplesheet params as a flat json structure
#
# samplesheet_params = { 'sample' => sample.puid }
# sample_info['files'].each do |file_info|
# samplesheet_params[file_info['file_type']] = file_info['file_id']
# end

# We expect results to have numbered entries as strings starting with "0", so we use the index
result[index.to_s] = {
Expand Down

0 comments on commit 815d739

Please sign in to comment.