Skip to content

Commit

Permalink
Fix: scope to current institution when creating box from CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden committed Jul 20, 2023
1 parent 39defaf commit aec4a93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/box_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def parse_csv(path)
CSV.open(path, headers: true) do |csv|
csv.each do |row|
next unless batch_number = row["Batch"]&.strip.presence
next unless batch = Batch.find_by(batch_number: batch_number)
next unless batch = @box.institution.batches.find_by(batch_number: batch_number)

@batches_data[@batches_data.size] = {
batch_uuid: batch.uuid,
Expand Down

0 comments on commit aec4a93

Please sign in to comment.