Improve error handling.
This commit is contained in:
parent
e77034c177
commit
08736f8556
1 changed files with 5 additions and 2 deletions
|
@ -233,8 +233,11 @@ Your #{config.product_name} Team
|
||||||
|
|
||||||
location = ['street', 'zip', 'city', 'country']
|
location = ['street', 'zip', 'city', 'country']
|
||||||
|
|
||||||
|
# get current user data
|
||||||
|
current = User.where( :id => self.id ).first
|
||||||
|
return if !current
|
||||||
|
|
||||||
# check if geo update is needed
|
# check if geo update is needed
|
||||||
current = User.find( self.id )
|
|
||||||
current_location = {}
|
current_location = {}
|
||||||
location.each { |item|
|
location.each { |item|
|
||||||
current_location[item] = current[item]
|
current_location[item] = current[item]
|
||||||
|
|
Loading…
Reference in a new issue