Removed broken branch validation code

This commit is contained in:
Victor Ng 2018-08-13 16:58:58 -04:00
Родитель 747d65fc9f
Коммит dfe8e2b2fb
1 изменённых файлов: 0 добавлений и 9 удалений

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

@ -12,7 +12,6 @@ from taar.profile_fetcher import ProfileFetcher
from taar import recommenders
# These are configurations that are specific to the TAAR library
VALID_BRANCHES = set(['linear', 'ensemble', 'control'])
TAAR_MAX_RESULTS = config('TAAR_MAX_RESULTS', default=10, cast=int)
@ -46,14 +45,6 @@ def configure_plugin(app):
branch = request.args.get('branch', '')
if branch.endswith('-taar'):
branch = branch.replace("-taar", "")
if branch not in VALID_BRANCHES:
# Force branch to be a control branch if an invalid request
# comes in.
branch = 'control'
extra_data = {'branch': branch}
locale = request.args.get('locale', None)