Improve error handling.

This commit is contained in:
Martin Edenhofer 2012-06-20 11:39:53 +02:00
parent e77034c177
commit 08736f8556

View file

@ -232,9 +232,12 @@ Your #{config.product_name} Team
end
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
current = User.find( self.id )
current_location = {}
location.each { |item|
current_location[item] = current[item]