From 72db9084a8835170264419b4453719e9240be1d1 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 24 Oct 2018 13:16:50 +0200 Subject: [PATCH] Fix old carto exception when no selection is passed --- app/controllers/users/carte_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users/carte_controller.rb b/app/controllers/users/carte_controller.rb index 855a7dd52..9c952d513 100644 --- a/app/controllers/users/carte_controller.rb +++ b/app/controllers/users/carte_controller.rb @@ -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