<filename>django/people/migrations/0020_opt_in_splicing.py
# Generated by Django 2.0.6 on 2018-06-22 10:06

from django.db import migrations


class Migration(migrations.Migration):

    def opt_in_splicing(apps, schema_editor):
        People = apps.get_model('people', 'Person')
        for p in People.objects.all():
            if not p.news_opt_in:
                p.feature_updates = False
                p.upcoming_events = False
                p.job_opportunities = False
                p.save()

    dependencies = [
        ('people', '0019_auto_20180622_1006'),
    ]

    operations = [
        migrations.RunPython(opt_in_splicing)
    ]

<filename>django/people/migrations/0020_opt_in_splicing.py
# Generated by Django 2.0.6 on 2018-06-22 10:06

from django.db import migrations


class Migration(migrations.Migration):

    def opt_in_splicing(apps, schema_editor):
        People = apps.get_model('people', 'Person')
        for p in People.objects.all():
            if not p.news_opt_in:
                p.feature_updates = False
                p.upcoming_events = False
                p.job_opportunities = False
                p.save()

    dependencies = [
        ('people', '0019_auto_20180622_1006'),
    ]

    operations = [
        migrations.RunPython(opt_in_splicing)
    ]

# Generated by Django 2.0.6 on 2018-06-22 10:06