Content-Length: 284694 | pFad | http://github.com/optimizely/python-sdk/pull/447/commits/3c1903b2054ae5d76a84b82f02c9b1623a02ccb1

B7 [FSSDK-11017] update: experiment_id and variation_id added to payloads by FarhanAnjum-opti · Pull Request #447 · optimizely/python-sdk · GitHub
Skip to content

[FSSDK-11017] update: experiment_id and variation_id added to payloads #447

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
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
change in logic to get experiment_id by key or rollout_id
  • Loading branch information
FarhanAnjum-opti committed Apr 15, 2025
commit 3c1903b2054ae5d76a84b82f02c9b1623a02ccb1
14 changes: 7 additions & 7 deletions optimizely/project_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,13 +728,7 @@ def get_experiment_id_by_key_or_rollout_id(self, key: str, rollout_id: Optional[
Returns:
Optional[str]: The experiment ID if found, otherwise None.
"""
# Try getting the experiment from experiment_key_map first
if key:
experiment = self.get_experiment_from_key(key)
if experiment:
return experiment.id

# If key is not found in experiment_key_map, check a specific rollout (if provided)
# Check a specific rollout (if provided)
if rollout_id:
rollout = self.get_rollout_from_id(rollout_id)
if rollout:
Expand All @@ -743,4 +737,10 @@ def get_experiment_id_by_key_or_rollout_id(self, key: str, rollout_id: Optional[
if experiment.key == key:
return experiment.id

# Try getting the experiment from experiment_key_map
if key:
experiment = self.get_experiment_from_key(key)
if experiment:
return experiment.id

return None
Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/optimizely/python-sdk/pull/447/commits/3c1903b2054ae5d76a84b82f02c9b1623a02ccb1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy