21 lines
541 B
Python
21 lines
541 B
Python
from django.db import migrations
|
|
|
|
|
|
def backfill_null_visibility(apps, schema_editor):
|
|
Scrobble = apps.get_model("scrobbles", "Scrobble")
|
|
Scrobble.objects.filter(visibility__isnull=True).update(visibility="private")
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("scrobbles", "0094_scrobble_share_view_count_alter_scrobble_visibility_and_more"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(
|
|
backfill_null_visibility,
|
|
reverse_code=migrations.RunPython.noop,
|
|
),
|
|
]
|