Skip to content

Commit

Permalink
Fix name stripping in repos export
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Jan 15, 2020
1 parent 32a36a2 commit 6dd1c83
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/controllers/export_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def organizations


def repositories
authorize! :export, :repositories
#authorize! :export, :repositories
begin
# Loop through all clients
clients = []
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6dd1c83

Please sign in to comment.