Merge pull request #978 from sgmap/fix-432

[Fix #432] Stop raising a useless exception in get_position
This commit is contained in:
gregoirenovel 2017-11-22 17:49:52 +01:00 committed by GitHub
commit c8f3b69943
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,12 @@ class Users::CarteController < UsersController
end
def get_position
begin
etablissement = current_user_dossier.etablissement
rescue ActiveRecord::RecordNotFound
etablissement = nil
end
point = Carto::Geocodeur.convert_adresse_to_point(etablissement.geo_adresse) unless etablissement.nil?
lon = '2.428462'