Skip to content

Commit

Permalink
Handle exception when there is no barcode file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed Mar 2, 2018
1 parent e144c6e commit 04d80bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/sal3_batch_requests_batches_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def download
@sal3_batch_requests_batch = Sal3BatchRequestsBatch.find(params[:id])
begin
send_file @sal3_batch_requests_batch[:bc_file], type: 'text/plain', disposition: 'attachment'
raise TypeError
raise TypeError
flash[:warning] = 'No barcode file exists for this batch.'
redirect_to root_path
end
Expand Down

0 comments on commit 04d80bf

Please sign in to comment.