Skip to content

Commit de9971d

Browse files
author
Ran Isenberg
committed
a
1 parent ec84107 commit de9971d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

aws_lambda_powertools/utilities/feature_flags/feature_flags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def _evaluate_conditions(
8484
return False # context doesn't match condition
8585

8686
logger.debug(f"rule matched, rule_name={rule_name}, rule_value={rule_match_value}, name={feature_name}")
87-
return True
87+
return rule_match_value
8888

8989
def _evaluate_rules(
9090
self, *, feature_name: str, context: Dict[str, Any], feat_default: bool, rules: Dict[str, Any]

tests/functional/feature_flags/test_feature_flags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def test_flags_conditions_rule_match_equal_multiple_conditions(mocker, config):
165165
username_val = "a"
166166
mocked_app_config_schema = {
167167
"my_feature": {
168-
"default": True,
168+
"default": False,
169169
"rules": {
170170
"tenant id equals 6 and username is a": {
171171
"when_match": expected_value,

0 commit comments

Comments
 (0)