Merge pull request #978 from sgmap/fix-432
[Fix #432] Stop raising a useless exception in get_position
This commit is contained in:
commit
c8f3b69943
1 changed files with 6 additions and 1 deletions
|
@ -31,7 +31,12 @@ class Users::CarteController < UsersController
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_position
|
def get_position
|
||||||
etablissement = current_user_dossier.etablissement
|
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?
|
point = Carto::Geocodeur.convert_adresse_to_point(etablissement.geo_adresse) unless etablissement.nil?
|
||||||
|
|
||||||
lon = '2.428462'
|
lon = '2.428462'
|
||||||
|
|
Loading…
Reference in a new issue