Browse Source

Allow log creation with bad rows.

pull/84/head
baarkerlounger 4 years ago
parent
commit
b23c0f3e65
  1. 8
      app/models/bulk_upload.rb

8
app/models/bulk_upload.rb

@ -26,7 +26,13 @@ class BulkUpload
else
data_range = FIRST_DATA_ROW..last_row
data_range.map do |row_num|
CaseLog.create(map_row(sheet.row(row_num)))
case_log = CaseLog.create
map_row(sheet.row(row_num)).each do |attr_key, attr_val|
begin
case_log.update_attribute(attr_key, attr_val)
rescue ArgumentError
end
end
end
end
end

Loading…
Cancel
Save