У меня есть код миграции на Django:
Он создает данные в базе данных

```
from django.db import migrations, models
import django.db.models.deletion
from django.contrib.auth import get_user_model

from KRSK_WorkSheets import models as krsk_models


User = get_user_model()


COUNTERPARTYS = [
    {
        'counterparty'      : 'Командор-Розница',
        'slug'              : '%D0%9A%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D0%BE%D1%80-%D0%A0%D0%BE%D0%B7%D0%BD%D0%B8%D1%86%D0%B0',
        'shop'              : krsk_models.KShop,
        'shop_user'         : krsk_models.KShopUser,
        'worksheets'        : krsk_models.KWorkSheets,
        'timesheets'        : krsk_models.KTimeSheets,
        'export_4_payment'  : krsk_models.KExport4Payment,
        'workers'           : krsk_models.KWorkers,
        'type_of_work'      : krsk_models.KTypeOfWork,
    },
    {
        'counterparty'      : 'Командор-СК',
        'slug'              : '%D0%9A%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D0%BE%D1%80-%D0%A1%D0%9A',
        'shop'              : krsk_models.KShop,
        'shop_user'         : krsk_models.KShopUser,
        'worksheets'        : krsk_models.SSWorkSheets,
        'timesheets'        : krsk_models.SSTimeSheets,
        'export_4_payment'  : krsk_models.SSExport4Payment,
        'workers'           : krsk_models.SSWorkers,
        'type_of_work'      : krsk_models.SSTypeOfWork,
    },
    {
        'counterparty'      : 'Разгуляй',
        'slug'              : '%D0%A0%D0%B0%D0%B7%D0%B3%D1%83%D0%BB%D1%8F%D0%B9',
        'shop'              : krsk_models.RazgulayShop,
        'shop_user'         : krsk_models.RazgulayShopUser,
        'worksheets'        : krsk_models.RazgulayWorkSheets,
        'timesheets'        : krsk_models.RazgulayTimeSheets,
        'export_4_payment'  : krsk_models.RazgulayExport4Payment,
        'workers'           : krsk_models.RazgulayWorkers,
        'type_of_work'      : krsk_models.RazgulayTypeOfWork,
    },
    {
        'counterparty'      : 'РОНДО',
        'slug'              : '%D0%A0%D0%9E%D0%9D%D0%94%D0%9E',
        'shop'              : krsk_models.RondoShop,
        'shop_user'         : krsk_models.RondoShopUser,
        'worksheets'        : krsk_models.RondoWorkSheets,
        'timesheets'        : krsk_models.RondoTimeSheets,
        'export_4_payment'  : krsk_models.RondoExport4Payment,
        'workers'           : krsk_models.RondoWorkers,
        'type_of_work'      : krsk_models.RondoTypeOfWork,
    },
]


GROUP_TO_COUNTERPARTY = [
    ['Отдел обслуживания', 'Командор-Розница'],
    ['Служба Контроля', 'Командор-СК'],
    ['Разгуляй', 'Разгуляй'],
    ['РОНДО', 'РОНДО'],
]


def add_counterpartys():
    for c in COUNTERPARTYS:
        print(c)
        krsk_models.Counterparty.objects.create(
            counterparty=c['counterparty'],
            slug=c['slug'],
            export_4_payment=c['export_4_payment'],
            shop=c['shop'],
            shop_user=c['shop_user'],
            timesheets=c['timesheets'],
            type_of_work=c['type_of_work'],
            workers=c['workers'],
            worksheets=c['worksheets'],)


def add_counterparty_to_user():
    for pair in GROUP_TO_COUNTERPARTY:
        group_users = User.objects.filter(groups__name=pair[0])
        counterparty = krsk_models.Counterparty.get(counterparty=pair[1])
        for user in group_users:
            user.extendaccount.last_counterparty = counterparty


class Migration(migrations.Migration):

    operations = [
        migrations.CreateModel(
            name='Counterparty',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('counterparty', models.CharField(blank=True, max_length=200, null=True, verbose_name='Название контрагента')),
                ('slug', models.SlugField(default='', max_length=20, unique=True)),
                ('export_4_payment', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_export_4_payment_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('shop', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='contenttypes.contenttype')),
                ('shop_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_shop_user_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('timesheets', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_timesheets_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('type_of_work', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_type_of_work_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('workers', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_workers_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('worksheets', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_worksheets_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
            ],
        ),
        migrations.AddField(
            model_name='extendaccount',
            name='last_counterparty',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='KRSK_WorkSheets.counterparty'),
        ),
        migrations.AddField(
            model_name='filterdata',
            name='counterparty',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='KRSK_WorkSheets.counterparty'),
        ),
        migrations.RunPython(add_counterpartys),
        migrations.RunPython(add_counterparty_to_user),
    ]

```

При запуске я получаю ошибку:
```
ValueError: Cannot assign "<class 'KRSK_WorkSheets.models.KShop'>": "Counterparty.shop" must be a "ContentType" instance.
```