[#10919] When data in geo_area is invalid do not crash when .label is called
This commit is contained in:
parent
1cd4c7a885
commit
49c9f274e4
2 changed files with 11 additions and 1 deletions
|
@ -65,7 +65,7 @@ class GeoArea < ApplicationRecord
|
|||
def label
|
||||
case source
|
||||
when GeoArea.sources.fetch(:cadastre)
|
||||
I18n.t("cadastre", scope: 'geo_area.label', numero: numero, prefixe: prefixe, section: section, surface: surface.round, commune: commune)
|
||||
I18n.t("cadastre", scope: 'geo_area.label', numero: numero, prefixe: prefixe, section: section, surface: surface&.round, commune: commune)
|
||||
when GeoArea.sources.fetch(:selection_utilisateur)
|
||||
if polygon?
|
||||
if area > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue