Skip to content

Commit

Permalink
Fix: generic relation not available during migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Sep 3, 2024
1 parent 6b5b5f0 commit 52e60fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion djangocms_blog/migrations/0044_copy_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit 52e60fd

Please sign in to comment.