about summary refs log tree commit diff
path: root/app/controllers/concerns
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-01-18 16:20:52 +0100
committerGitHub <noreply@github.com>2023-01-18 16:20:52 +0100
commitfcc4c9b34a6ab771c9cef6673e817866773e12d0 (patch)
tree5c01eb573c0da1b549531091b25649235a571480 /app/controllers/concerns
parent302fcb9788b63bf50fa8e3452626402ccbd8522a (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.rb10
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