From 9cb3e72abd1916567009503ba219651fd3da5c0f Mon Sep 17 00:00:00 2001 From: Jared Kerim Date: Thu, 16 Nov 2017 15:23:12 -0500 Subject: [PATCH] Add pref_branch fixes #244 --- app/experimenter/experiments/admin.py | 1 + app/experimenter/experiments/models.py | 6 +++++- app/experimenter/experiments/serializers.py | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/experimenter/experiments/admin.py b/app/experimenter/experiments/admin.py index 5ab289e85..aa734feb5 100644 --- a/app/experimenter/experiments/admin.py +++ b/app/experimenter/experiments/admin.py @@ -81,6 +81,7 @@ class ExperimentAdmin(admin.ModelAdmin): 'slug', 'pref_key', 'pref_type', + 'pref_branch', 'firefox_channel', 'firefox_version', 'population_percent', diff --git a/app/experimenter/experiments/models.py b/app/experimenter/experiments/models.py index 7466180e0..fc0d8bd96 100644 --- a/app/experimenter/experiments/models.py +++ b/app/experimenter/experiments/models.py @@ -90,7 +90,11 @@ class Experiment(models.Model): max_length=255, choices=PREF_TYPE_CHOICES, ) - pref_branch = models.CharField(max_length=255, choices=PREF_BRANCH_CHOICES) + pref_branch = models.CharField( + max_length=255, + choices=PREF_BRANCH_CHOICES, + default=PREF_BRANCH_DEFAULT, + ) firefox_version = models.CharField(max_length=255) firefox_channel = models.CharField( max_length=255, choices=CHANNEL_CHOICES, default=CHANNEL_NIGHTLY) diff --git a/app/experimenter/experiments/serializers.py b/app/experimenter/experiments/serializers.py index cec7f9df2..f55a86fbd 100644 --- a/app/experimenter/experiments/serializers.py +++ b/app/experimenter/experiments/serializers.py @@ -59,6 +59,7 @@ class ExperimentSerializer(serializers.ModelSerializer): 'pref_branch', 'pref_key', 'pref_type', + 'pref_branch', 'project_name', 'project_slug', 'reject_url',