From 7dac78f2e7e98f87b835855f4a67d24de5c5437f Mon Sep 17 00:00:00 2001 From: haptikrajasashtikar Date: Mon, 6 Jun 2022 16:50:18 +0530 Subject: [PATCH 1/2] Skip the flags that are disabled --- FeatureToggle/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FeatureToggle/__init__.py b/FeatureToggle/__init__.py index c612743..f5a0fab 100644 --- a/FeatureToggle/__init__.py +++ b/FeatureToggle/__init__.py @@ -235,6 +235,8 @@ def fetch_feature_toggles(): try: if feature_toggles: for feature_toggle in feature_toggles: + if feature_toggle.get('enabled', False): + continue full_feature_name = feature_toggle['name'] # split the feature and get compare the cas and environment name feature = full_feature_name.split('.') From 228547f05ff5800399219be4c51798c3901040a2 Mon Sep 17 00:00:00 2001 From: haptikrajasashtikar Date: Mon, 6 Jun 2022 17:03:24 +0530 Subject: [PATCH 2/2] Fix the condition --- FeatureToggle/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FeatureToggle/__init__.py b/FeatureToggle/__init__.py index f5a0fab..9750adf 100644 --- a/FeatureToggle/__init__.py +++ b/FeatureToggle/__init__.py @@ -235,7 +235,7 @@ def fetch_feature_toggles(): try: if feature_toggles: for feature_toggle in feature_toggles: - if feature_toggle.get('enabled', False): + if not feature_toggle.get('enabled', False): continue full_feature_name = feature_toggle['name'] # split the feature and get compare the cas and environment name