Skip to content

Commit 120a408

Browse files
update project_config.py
1 parent 3c1903b commit 120a408

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

optimizely/project_config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ def get_experiment_id_by_key_or_rollout_id(self, key: str, rollout_id: Optional[
723723
724724
Args:
725725
key: The key associated with the experiment rule. It can be experiment key or rule key.
726-
rollout_id: The ID of the rollout to be searched if the key is not found in the experiment key map.
726+
rollout_id: The ID of the rollout to be searched if the experiment if from a rollout.
727727
728728
Returns:
729729
Optional[str]: The experiment ID if found, otherwise None.
@@ -733,9 +733,9 @@ def get_experiment_id_by_key_or_rollout_id(self, key: str, rollout_id: Optional[
733733
rollout = self.get_rollout_from_id(rollout_id)
734734
if rollout:
735735
for experiment_data in rollout.experiments:
736-
experiment = entities.Experiment(**experiment_data)
737-
if experiment.key == key:
738-
return experiment.id
736+
rollout_experiment = entities.Experiment(**experiment_data)
737+
if rollout_experiment.key == key:
738+
return rollout_experiment.id
739739

740740
# Try getting the experiment from experiment_key_map
741741
if key:

0 commit comments

Comments
 (0)