Merge pull request #2900 from tchak/fix-cart-selection-param
Fix old carto exception when no selection is passed
This commit is contained in:
commit
000d19b1f6
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue