8000 fix: Forced variation not available in experiment by ozayr-zaviar · Pull Request #367 · optimizely/python-sdk · GitHub
[go: up one dir, main page]

Skip to content

fix: Forced variation not available in experiment #367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 22, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Jae Kim <45045038+jaeopt@users.noreply.github.com>
  • Loading branch information
msohailhussain and jaeopt authored Dec 14, 2021
commit 9eed3ecbf557ecb486477985141d624b21b98cba
4 changes: 2 additions & 2 deletions optimizely/event/user_event_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def create_impression_event(

if variation_id and flag_key:
variation = project_config.get_flag_variation(flag_key, 'id', variation_id)
if not variation and variation_id and experiment_id:
# need this condition when we send events involving forced decisions
elif variation_id and experiment_id:
# need this condition when we send events involving forced decisions (F-to-D or E-to-D with any ruleKey/variationKey combinations)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this comment line to the top of line 52.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a unit test covering this bug?

variation = project_config.get_variation_from_id_by_experiment_id(experiment_id, variation_id)

event_context = user_event.EventContext(
Expand Down
0