always validate geometries returned from api
This commit is contained in:
parent
3fe1e75c36
commit
7c58f06c60
6 changed files with 104 additions and 46 deletions
|
@ -20,6 +20,10 @@ class GeoAreaSerializer < ActiveModel::Serializer
|
|||
attribute :surface, if: :include_parcelle_agricole?
|
||||
attribute :bio, if: :include_parcelle_agricole?
|
||||
|
||||
def geometry
|
||||
object.safe_geometry
|
||||
end
|
||||
|
||||
def include_cadastre?
|
||||
object.source == GeoArea.sources.fetch(:cadastre)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue