From 1e0baca86611e9ff91f55a77e758d7537fbfad2a Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 29 Feb 2024 15:13:44 +0100 Subject: [PATCH] fix(dossier): no crach if condition target champ is not found --- app/models/logic/champ_value.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/logic/champ_value.rb b/app/models/logic/champ_value.rb index a9638001b..efb46a55a 100644 --- a/app/models/logic/champ_value.rb +++ b/app/models/logic/champ_value.rb @@ -37,6 +37,7 @@ class Logic::ChampValue < Logic::Term def compute(champs) targeted_champ = champ(champs) + return nil if targeted_champ.nil? return nil if !targeted_champ.visible? return nil if targeted_champ.blank? & !targeted_champ.drop_down_other?