File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -714,8 +714,8 @@ def get_decision_for_flag(
714714 reasons .extend (holdout_decision ['reasons' ])
715715
716716 decision = holdout_decision ['decision' ]
717- # Check if user was bucketed into holdout (has a decision )
718- if decision is None :
717+ # Check if user was bucketed into holdout (has a variation )
718+ if decision is None or decision . variation is None :
719719 continue
720720
721721 message = (
@@ -905,9 +905,9 @@ def get_variation_for_holdout(
905905 self .logger .info (message )
906906 decide_reasons .append (message )
907907
908- # Create Decision for holdout - experiment is None , source is HOLDOUT
908+ # Create Decision for holdout - pass holdout dict as experiment , source is HOLDOUT
909909 holdout_decision : Decision = Decision (
910- experiment = None ,
910+ experiment = holdout ,
911911 variation = variation ,
912912 source = enums .DecisionSources .HOLDOUT ,
913913 cmab_uuid = None
Original file line number Diff line number Diff line change @@ -873,7 +873,7 @@ def test_decide__option__include_reasons__feature_rollout(self):
873873 'Audiences for rule 1 collectively evaluated to TRUE.' ,
874874 'User "test_user" meets audience conditions for targeting rule 1.' ,
875875 'User "test_user" bucketed into a targeting rule 1.' ,
876- ' The user " test_user" is bucketed into a rollout for feature flag " test_feature_in_rollout".'
876+ " The user ' test_user' is bucketed into a rollout for feature flag ' test_feature_in_rollout'."
877877 ]
878878
879879 self .assertEqual (expected_reasons , actual .reasons )
You can’t perform that action at this time.
0 commit comments