From d067b8198a390036b4cc7e345ea457a7d2e739de Mon Sep 17 00:00:00 2001 From: Chris Smit Date: Tue, 20 Aug 2024 13:30:51 +0200 Subject: [PATCH] Combine the events and pipelines v2 FF --- .../0007_combine_events_and_pipeline_flags.py | 23 +++++++++++++++++++ .../experiments/single_experiment_home.html | 2 +- templates/web/components/team_nav.html | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 apps/teams/migrations/0007_combine_events_and_pipeline_flags.py diff --git a/apps/teams/migrations/0007_combine_events_and_pipeline_flags.py b/apps/teams/migrations/0007_combine_events_and_pipeline_flags.py new file mode 100644 index 000000000..cffc597a2 --- /dev/null +++ b/apps/teams/migrations/0007_combine_events_and_pipeline_flags.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.15 on 2024-08-20 11:41 + +from django.db import migrations + + +def create_events_and_pipelines_v2_flag(apps, schema_editor): + Flag = apps.get_model("teams", "Flag") + new_flag = Flag.objects.create(name="events_and_pipelines_v2", everyone=False) + events_flag = Flag.objects.get(name="events") + pipelines_v2_flag = Flag.objects.get(name="pipelines-v2") + new_flag.teams.add(*pipelines_v2_flag.teams.all()) + new_flag.teams.add(*events_flag.teams.all()) + + +class Migration(migrations.Migration): + + dependencies = [ + ('teams', '0006_remove_invitation_role_remove_membership_role'), + ] + + operations = [ + migrations.RunPython(create_events_and_pipelines_v2_flag, migrations.RunPython.noop, elidable=True), + ] diff --git a/templates/experiments/single_experiment_home.html b/templates/experiments/single_experiment_home.html index 323a5bd1d..e9ec66722 100644 --- a/templates/experiments/single_experiment_home.html +++ b/templates/experiments/single_experiment_home.html @@ -249,7 +249,7 @@

Parent Experiments: - {% flag "events" %} + {% flag "events_and_pipelines_v2" %}
diff --git a/templates/web/components/team_nav.html b/templates/web/components/team_nav.html index 9abb6a4aa..8ed1c5b0a 100644 --- a/templates/web/components/team_nav.html +++ b/templates/web/components/team_nav.html @@ -80,7 +80,7 @@ {% endif %} {% endflag %} - {% flag "pipelines-v2" %} + {% flag "events_and_pipelines_v2" %}
  • {% if perms.pipelines.view_pipeline %}