Fix old carto exception when no selection is passed
This commit is contained in:
parent
5b8c64081e
commit
72db9084a8
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ class Users::CarteController < UsersController
|
||||||
@dossier = current_user_dossier
|
@dossier = current_user_dossier
|
||||||
@data = {}
|
@data = {}
|
||||||
|
|
||||||
geo_json = JSON.parse(params.required(:selection))
|
geo_json = JSON.parse(params.fetch(:selection, '[]'))
|
||||||
|
|
||||||
if geo_json.first == ["error", "TooManyPolygons"]
|
if geo_json.first == ["error", "TooManyPolygons"]
|
||||||
@error = true
|
@error = true
|
||||||
|
|
Loading…
Add table
Reference in a new issue