Skip to content

Commit

Permalink
use correct format for role_name. #697
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jan 29, 2021
1 parent 9f02380 commit f8566b0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/models/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def self.import_from_providers
provider_id: provider.uid,
given_name: provider.voting_contact_given_name,
family_name: provider.voting_contact_family_name,
role_name: (Array.wrap(contact.role_name.underscore) << "voting").uniq)
role_name: (Array.wrap(contact.role_name) << "voting").uniq)
puts "Imported voting contact #{contact.email} for provider #{provider.symbol}."
else
puts "Error importing voting contact #{contact.email} for provider #{provider.symbol}: #{contact.errors.messages.inspect}."
Expand All @@ -146,7 +146,7 @@ def self.import_from_providers
provider_id: provider.uid,
given_name: provider.billing_contact_given_name,
family_name: provider.billing_contact_family_name,
role_name: (Array.wrap(contact.role_name.underscore) << "billing").uniq)
role_name: (Array.wrap(contact.role_name) << "billing").uniq)
puts "Imported billing contact #{contact.email} for provider #{provider.symbol}."
else
puts "Error importing billing contact #{contact.email} for provider #{provider.symbol}: #{contact.errors.messages.inspect}."
Expand All @@ -159,7 +159,7 @@ def self.import_from_providers
provider_id: provider.uid,
given_name: provider.secondary_billing_contact_given_name,
family_name: provider.secondary_billing_contact_family_name,
role_name: (Array.wrap(contact.role_name.underscore) << "secondaryBilling").uniq)
role_name: (Array.wrap(contact.role_name) << "secondary_billing").uniq)
puts "Imported secondary billing contact #{contact.email} for provider #{provider.symbol}."
else
puts "Error importing secondary technical contact #{contact.email} for provider #{provider.symbol}: #{contact.errors.messages.inspect}."
Expand All @@ -172,7 +172,7 @@ def self.import_from_providers
provider_id: provider.uid,
given_name: provider.service_contact_given_name,
family_name: provider.service_contact_family_name,
role_name: (Array.wrap(contact.role_name.underscore) << "service").uniq)
role_name: (Array.wrap(contact.role_name) << "service").uniq)
puts "Imported service contact #{contact.email} for provider #{provider.symbol}."
else
puts "Error importing service contact #{contact.email} for provider #{provider.symbol}: #{contact.errors.messages.inspect}."
Expand All @@ -185,7 +185,7 @@ def self.import_from_providers
provider_id: provider.uid,
given_name: provider.secondary_service_contact_given_name,
family_name: provider.secondary_service_contact_family_name,
role_name: (Array.wrap(contact.role_name.underscore) << "secondaryService").uniq)
role_name: (Array.wrap(contact.role_name) << "secondary_service").uniq)
puts "Imported secondary service contact #{contact.email} for provider #{provider.symbol}."
else
puts "Error importing secondary service contact #{contact.email} for provider #{provider.symbol}: #{contact.errors.messages.inspect}."
Expand All @@ -198,7 +198,7 @@ def self.import_from_providers
provider_id: provider.uid,
given_name: provider.technical_contact_given_name,
family_name: provider.technical_contact_family_name,
role_name: (Array.wrap(contact.role_name.underscore) << "technical").uniq)
role_name: (Array.wrap(contact.role_name) << "technical").uniq)
puts "Imported technical contact #{contact.email} for provider #{provider.symbol}."
else
puts "Error importing technical contact #{contact.email} for provider #{provider.symbol}: #{contact.errors.messages.inspect}."
Expand All @@ -211,7 +211,7 @@ def self.import_from_providers
provider_id: provider.uid,
given_name: provider.secondary_technical_contact_given_name,
family_name: provider.secondary_technical_contact_family_name,
role_name: (Array.wrap(contact.role_name.underscore) << "secondaryTechnical").uniq)
role_name: (Array.wrap(contact.role_name) << "secondary_technical").uniq)
puts "Imported secondary technical contact #{contact.email} for provider #{provider.symbol}."
else
puts "Error importing secondary technical contact #{contact.email} for provider #{provider.symbol}: #{contact.errors.messages.inspect}."
Expand Down

0 comments on commit f8566b0

Please sign in to comment.