Skip to content

Commit

Permalink
handle missing contact email
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Mar 8, 2020
1 parent 8e680d8 commit acee21c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/controllers/export_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ def contacts
}

providers.each do |provider|
add_contact.call(contacts, provider.technical_contact.email, provider.symbol, provider.technical_contact.given_name, provider.technical_contact.family_name, 'technical')
add_contact.call(contacts, provider.secondary_technical_contact.email, provider.symbol, provider.secondary_technical_contact.given_name, provider.secondary_technical_contact.family_name, 'secondaryTechnical')
add_contact.call(contacts, provider.service_contact.email, provider.symbol, provider.service_contact.given_name, provider.service_contact.family_name, 'service')
add_contact.call(contacts, provider.secondary_service_contact.email, provider.symbol, provider.secondary_service_contact.given_name, provider.secondary_service_contact.family_name, 'secondaryService')
add_contact.call(contacts, provider.voting_contact.email, provider.symbol, provider.voting_contact.given_name, provider.voting_contact.family_name, 'voting')
add_contact.call(contacts, provider.billing_contact.email, provider.symbol, provider.billing_contact.given_name, provider.billing_contact.family_name, 'billing')
add_contact.call(contacts, provider.secondary_billing_contact.email, provider.symbol, provider.secondary_billing_contact.given_name, provider.secondary_billing_contact.family_name, 'secondaryBilling')
add_contact.call(contacts, provider.technical_contact.email, provider.symbol, provider.technical_contact.given_name, provider.technical_contact.family_name, 'technical') if provider.technical_contact.present?
add_contact.call(contacts, provider.secondary_technical_contact.email, provider.symbol, provider.secondary_technical_contact.given_name, provider.secondary_technical_contact.family_name, 'secondaryTechnical') if provider.secondary_technical_contact.present?
add_contact.call(contacts, provider.service_contact.email, provider.symbol, provider.service_contact.given_name, provider.service_contact.family_name, 'service') if provider.service_contact.present?
add_contact.call(contacts, provider.secondary_service_contact.email, provider.symbol, provider.secondary_service_contact.given_name, provider.secondary_service_contact.family_name, 'secondaryService') if provider.secondary_service_contact.present?
add_contact.call(contacts, provider.voting_contact.email, provider.symbol, provider.voting_contact.given_name, provider.voting_contact.family_name, 'voting') if provider.voting_contact.present?
add_contact.call(contacts, provider.billing_contact.email, provider.symbol, provider.billing_contact.given_name, provider.billing_contact.family_name, 'billing') if provider.billing_contact.present?
add_contact.call(contacts, provider.secondary_billing_contact.email, provider.symbol, provider.secondary_billing_contact.given_name, provider.secondary_billing_contact.family_name, 'secondaryBilling') if provider.secondary_billing_contact.present?
end

contacts.each do |email, contact|
Expand Down

0 comments on commit acee21c

Please sign in to comment.