From 52e60fdd3d612ac73eb14067ee200e62fc9ad7d8 Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Tue, 3 Sep 2024 21:13:01 +0200 Subject: [PATCH] Fix: generic relation not available during migrations --- djangocms_blog/migrations/0044_copy_plugins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/djangocms_blog/migrations/0044_copy_plugins.py b/djangocms_blog/migrations/0044_copy_plugins.py index 80948ef1..4dd6e6c4 100644 --- a/djangocms_blog/migrations/0044_copy_plugins.py +++ b/djangocms_blog/migrations/0044_copy_plugins.py @@ -61,7 +61,8 @@ def move_plugins_to_blog_content(apps, schema_editor): with BareVersion(Version) as Version: Version.objects.create( number="1", - contents=content, + content_type=content_type, # content generic relation is not avialable in migrations + object_id=content.pk, created_by=migration_user, state=PUBLISHED if post.publish else DRAFT, )