From 8c67df71305315d28d55e93c11d928e9ba95ec30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Carceles?= Date: Wed, 15 Feb 2023 12:17:28 +0100 Subject: [PATCH] review: use selected options Co-authored-by: Paul Chavard --- app/models/champs/multiple_drop_down_list_champ.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/champs/multiple_drop_down_list_champ.rb b/app/models/champs/multiple_drop_down_list_champ.rb index 4f14f197b..4e041fd0b 100644 --- a/app/models/champs/multiple_drop_down_list_champ.rb +++ b/app/models/champs/multiple_drop_down_list_champ.rb @@ -94,7 +94,7 @@ class Champs::MultipleDropDownListChamp < Champ end def values_are_in_options - json = JSON.parse(value).reject(&:blank?) + json = selected_options.reject(&:blank?) return if json.empty? return if (json - enabled_non_empty_options).empty?