diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb index 8bfc87acf..763b34b43 100644 --- a/app/controllers/exports_controller.rb +++ b/app/controllers/exports_controller.rb @@ -31,7 +31,7 @@ def contacts "email" => contact.email, "firstName" => contact.given_name, "lastName" => contact.family_name.present? ? contact.family_name : contact.email, - "type" => contact.role_name ? contact.role_name.map { |r| r.camelize(:lower) }.join(";") : nil, + "type" => contact.role_name ? Array.wrap(contact.role_name).map { |r| r.camelize(:lower) }.join(";") : nil, "createdAt" => export_date_string(contact.created_at), "modifiedAt" => export_date_string(contact.updated_at), "deletedAt" => contact.deleted_at.present? ? export_date_string(contact.deleted_at) : nil, diff --git a/app/controllers/v3/exports_controller.rb b/app/controllers/v3/exports_controller.rb index 3f086150f..82df512b3 100644 --- a/app/controllers/v3/exports_controller.rb +++ b/app/controllers/v3/exports_controller.rb @@ -32,7 +32,7 @@ def contacts "email" => contact.email, "firstName" => contact.given_name, "lastName" => contact.family_name, - "type" => contact.role_name ? contact.role_name.join(";") : nil, + "type" => contact.role_name ? Array.wrap(contact.role_name).join(";") : nil, "createdAt" => export_date_string(contact.created_at), "modifiedAt" => export_date_string(contact.updated_at), "deletedAt" => contact.deleted_at.present? ? export_date_string(contact.deleted_at) : nil,