Skip to content

Commit

Permalink
Strip quotes from name in export
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Jan 14, 2020
1 parent 020801c commit 47c4982
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/export_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,15 @@ 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
row = {
accountName: client.name.truncate(80),
accountName: name,
fabricaAccountId: client.symbol,
parentFabricaAccountId: client.provider.present? ? client.provider.symbol : nil,
isActive: client.is_active == "\x01",
Expand Down

0 comments on commit 47c4982

Please sign in to comment.