@@ -200,18 +200,6 @@ def __init__(self, project_config):
200
200
201
201
self .audiences = optly_typed_audiences
202
202
203
- def update_experiment (self , experiment , conditions , audiences_map ):
204
- '''
205
- Gets an OptimizelyExperiment to update, conditions from
206
- the corresponding entities.Experiment and an audiences_map
207
- in the form of [id:name]
208
-
209
- Updates the OptimizelyExperiment.audiences with a string
210
- of conditions and audience names.
211
- '''
212
- audiences = self .replace_ids_with_names (conditions , audiences_map )
213
- experiment .audiences = audiences
214
-
215
203
def replace_ids_with_names (self , conditions , audiences_map ):
216
204
'''
217
205
Gets conditions and audiences_map [id:name]
@@ -232,7 +220,7 @@ def lookup_name_from_id(self, audience_id, audiences_map):
232
220
233
221
Returns:
234
222
The name corresponding to the ID
235
- or None if not found
223
+ or None if not found.
236
224
'''
237
225
name = ""
238
226
try :
@@ -435,7 +423,8 @@ def _get_experiments_maps(self):
435
423
exp ['id' ], exp ['key' ], self ._get_variations_map (exp )
436
424
)
437
425
# Updating each OptimizelyExperiment
438
- self .update_experiment (optly_exp , exp .get ('audienceConditions' , []), audiences_map )
426
+ audiences = self .replace_ids_with_names (exp .get ('audienceConditions' , []), audiences_map )
427
+ optly_exp .audiences = audiences
439
428
440
429
experiments_key_map [exp ['key' ]] = optly_exp
441
430
experiments_id_map [exp ['id' ]] = optly_exp
@@ -473,7 +462,7 @@ def _get_delivery_rules(self, rollouts):
473
462
""" Gets an array of rollouts for the project config
474
463
475
464
returns:
476
- an array of OptimizelyExperiments as delivery rules
465
+ an array of OptimizelyExperiments as delivery rules.
477
466
"""
478
467
# Return list for delivery rules
479
468
delivery_rules = []
0 commit comments