Fix old carto exception when no selection is passed

This commit is contained in:
Paul Chavard 2018-10-24 13:16:50 +02:00
parent 5b8c64081e
commit 72db9084a8

View file

@ -32,7 +32,7 @@ class Users::CarteController < UsersController
@dossier = current_user_dossier
@data = {}
geo_json = JSON.parse(params.required(:selection))
geo_json = JSON.parse(params.fetch(:selection, '[]'))
if geo_json.first == ["error", "TooManyPolygons"]
@error = true