Make sure country is present [skip ci]

Andrew committed Mar 01, 2018
commit 32d8329c4eaa68d0aa97f99c58ba6ad6d66d70f1
Showing 1 changed file with 2 additions and 2 deletions
app/jobs/ahoy/geocode_v2_job.rb +2 -2
@@ @@ -11,9 +11,9 @@ module Ahoy
nil
end
- if location
+ if location && location.country.present?
data = {
- country: location.try(:country).presence,
+ country: location.country,
region: location.try(:state).presence,
city: location.try(:city).presence,
postal_code: location.try(:postal_code).presence,