Add expose legacy carto api flag

This commit is contained in:
Paul Chavard 2018-10-31 13:28:39 +01:00
parent 18815e88a3
commit 971a08c92a
2 changed files with 8 additions and 0 deletions

View file

@ -249,6 +249,10 @@ class Dossier < ApplicationRecord
procedure.use_legacy_carto?
end
def expose_legacy_carto_api?
procedure.expose_legacy_carto_api?
end
def user_geometry
if json_latlngs.present?
UserGeometry.new(json_latlngs)

View file

@ -135,6 +135,10 @@ class Procedure < ApplicationRecord
module_api_carto.use_api_carto? && !module_api_carto.migrated?
end
def expose_legacy_carto_api?
module_api_carto.use_api_carto? && module_api_carto.migrated?
end
# Warning: dossier after_save build_default_champs must be removed
# to save a dossier created from this method
def new_dossier