Compare commits
No commits in common. "fa1b0c9700f11ddf33afe4e9594d1f963f46af8a" and "7cf29376bd16ef425bb0a79bf526fe269b68a1ba" have entirely different histories.
fa1b0c9700
...
7cf29376bd
@ -32,19 +32,8 @@ def get_experiments(project, stage):
|
|||||||
response = get(URL_EXPERIMENTS, params={'project': project, 'stage': stage})
|
response = get(URL_EXPERIMENTS, params={'project': project, 'stage': stage})
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
return []
|
return []
|
||||||
data = response.json()
|
return response.json()
|
||||||
for exp in data:
|
|
||||||
if exp['condition'] == 'False':
|
|
||||||
exp['exp_type'] = 0
|
|
||||||
elif exp['condition'] == 'user.is_superuser':
|
|
||||||
exp['exp_type'] = 1
|
|
||||||
elif exp['condition'] == 'user.platform_staff':
|
|
||||||
exp['exp_type'] = 2
|
|
||||||
elif exp['condition'] == 'True':
|
|
||||||
exp['exp_type'] = 3
|
|
||||||
else:
|
|
||||||
exp['exp_type'] = 4
|
|
||||||
return data
|
|
||||||
|
|
||||||
def create_experiment(project, stage, name):
|
def create_experiment(project, stage, name):
|
||||||
post(URL_EXPERIMENTS, json={'project': project, 'stage': stage, 'name': name})
|
post(URL_EXPERIMENTS, json={'project': project, 'stage': stage, 'name': name})
|
||||||
|
Loading…
Reference in New Issue
Block a user