From 410522947ecd5cece05b895de1422be0c940c6e0 Mon Sep 17 00:00:00 2001 From: ulferts Date: Mon, 7 Nov 2022 16:40:48 +0100 Subject: [PATCH] increase feature flag robustness --- lib_static/open_project/feature_decisions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_static/open_project/feature_decisions.rb b/lib_static/open_project/feature_decisions.rb index 2198e28ab9..73b4f2b461 100644 --- a/lib_static/open_project/feature_decisions.rb +++ b/lib_static/open_project/feature_decisions.rb @@ -74,7 +74,7 @@ module OpenProject def define_flag_methods(flag_name) define_singleton_method "#{flag_name}_active?" do - Setting.send("feature_#{flag_name}_active?") + Setting.exists?("feature_#{flag_name}_active") && Setting.send("feature_#{flag_name}_active?") end end