Skip to content

Commit

Permalink
Migrate old visibility_email values to the new ones
Browse files Browse the repository at this point in the history
  • Loading branch information
mathjazz committed Dec 5, 2023
1 parent c3e3e3b commit 5bf0aff
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pontoon/base/migrations/0052_rename_logged_in_users.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 3.2.15 on 2023-12-05 20:02

from django.db import migrations


def rename_logged_in_users(apps, schema_editor):
UserProfile = apps.get_model("base", "UserProfile")
UserProfile.objects.filter(visibility_email="Logged in users").update(
visibility_email="Logged-in users"
)


class Migration(migrations.Migration):

dependencies = [
("base", "0051_localecodehistory"),
]

operations = [
migrations.RunPython(
code=rename_logged_in_users,
reverse_code=migrations.RunPython.noop,
),
]

0 comments on commit 5bf0aff

Please sign in to comment.