Renamed branch_selector to method_selector to clarify that we're trying to dispatch to a method based on the branch name

This commit is contained in:
Victor Ng 2018-07-27 14:15:21 -04:00
Родитель a893fff709
Коммит 0aa625d337
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -132,9 +132,9 @@ class RecommendationManager:
# Select recommendation output based on extra_data['branch']
branch_selector = extra_data.get('branch', INTERVENTION_CONTROL)
branch_selector = branch_selector.replace('-', '_')
branch_method = getattr(self, 'recommend_%s' % branch_selector)
method_selector = branch_selector.replace('-', '_')
branch_method = getattr(self, 'recommend_%s' % method_selector)
return branch_method(client_info, client_id, limit, extra_data)
def recommend_intervention_a(self, client_info, client_id, limit, extra_data):