Skip to content

polymorphic_ctype_id empty after adding data in migration #197

@TZanke

Description

@TZanke

I created a new model based on Django-Polymorphic. Now i try to move data from an other model to the new polymorphic model within a migration.

def forwards_func(apps, schema_editor):
    scanable = apps.get_model('xyz', 'Scanable')
    scanable.objects.create(can_scan=xy.for_scan)

But after manage.py migrate, the polymorphic_ctype_id column is empty.

What i am doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions