diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-01-18 16:20:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 16:20:52 +0100 |
commit | fcc4c9b34a6ab771c9cef6673e817866773e12d0 (patch) | |
tree | 5c01eb573c0da1b549531091b25649235a571480 /app/controllers/concerns | |
parent | 302fcb9788b63bf50fa8e3452626402ccbd8522a (diff) |
Change domain block CSV parsing to be more robust and handle more lists (#21470)
* Change domain block CSV parsing to be more robust and handle more lists * Add some tests * Improve domain block import validation and reporting
Diffstat (limited to 'app/controllers/concerns')
-rw-r--r-- | app/controllers/concerns/admin_export_controller_concern.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/app/controllers/concerns/admin_export_controller_concern.rb b/app/controllers/concerns/admin_export_controller_concern.rb index b40c76557..4ac48a04b 100644 --- a/app/controllers/concerns/admin_export_controller_concern.rb +++ b/app/controllers/concerns/admin_export_controller_concern.rb @@ -26,14 +26,4 @@ module AdminExportControllerConcern def import_params params.require(:admin_import).permit(:data) end - - def import_data_path - params[:admin_import][:data].path - end - - def parse_import_data!(default_headers) - data = CSV.read(import_data_path, headers: true, encoding: 'UTF-8') - data = CSV.read(import_data_path, headers: default_headers, encoding: 'UTF-8') unless data.headers&.first&.strip&.include?(default_headers[0]) - @data = data.reject(&:blank?) - end end |