diff --git a/app/models/bulk_upload.rb b/app/models/bulk_upload.rb index f546ea56d..dcab1753f 100644 --- a/app/models/bulk_upload.rb +++ b/app/models/bulk_upload.rb @@ -26,12 +26,14 @@ class BulkUpload else data_range = FIRST_DATA_ROW..last_row data_range.map do |row_num| - case_log = CaseLog.create + 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 + update = case_log.update(attr_key => attr_val) + unless update + # TODO: determine what to do when a bulk upload contains field values that don't pass validations end + rescue ArgumentError + # TODO: determine what we want to do when bulk upload contains totally invalid data for a field. end end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7ea45b6e4..ad52856b9 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -33,25 +33,12 @@ Skip to main content