Skip to content

Commit

Permalink
handle missing country
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed May 15, 2019
1 parent 2a4f056 commit 6819066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/funder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def self.query(query, options={})
def self.parse_message(id: nil, message: nil)
if message["location"].present?
c = ISO3166::Country.find_country_by_name(message["location"])
code = c.alpha2.present? ? c.alpha2 : nil
code = c.present? ? c.alpha2 : nil
country = {
"code" => code,
"name" => message["location"]
Expand Down

0 comments on commit 6819066

Please sign in to comment.