Skip to content

Commit

Permalink
fix 'type' attribute in evaluation_result accessed incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Yiu authored and Tim Yiu committed Aug 5, 2023
1 parent 77b8ac5 commit 3d02322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/amplitude_experiment/local/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def evaluate(self, user: User, flag_keys: List[str] = None) -> Dict[str, Variant
included = not filter_result or key in flag_keys
if not value.get('isDefaultVariant') and included:
variants[key] = Variant(value['variant'].get('key'), value['variant'].get('payload'))
if included or evaluation_result[key].type == FLAG_TYPE_MUTUAL_EXCLUSION_GROUP or \
evaluation_result[key].type == FLAG_TYPE_HOLDOUT_GROUP:
if included or evaluation_result[key]['type'] == FLAG_TYPE_MUTUAL_EXCLUSION_GROUP or \
evaluation_result[key]['type'] == FLAG_TYPE_HOLDOUT_GROUP:
assignment_result[key] = evaluation_result[key]

if self.assignment_service:
Expand Down

0 comments on commit 3d02322

Please sign in to comment.