Skip to content

Commit

Permalink
Fix collections import for latest Wagtail main (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
zerolab authored Apr 3, 2024
1 parent 327267e commit 4b2b18e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/testapp/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
import taggit.managers
import wagtail.blocks
import wagtail.fields
import wagtail.models.collections
import wagtail.search.index
import wagtailmedia.blocks

from django.conf import settings
from django.db import migrations, models


try:
import wagtail.models.media as collections
except ImportError:
import wagtail.models.collections as collections

import tests.testapp.models


Expand Down Expand Up @@ -169,7 +174,7 @@ class Migration(migrations.Migration):
(
"collection",
models.ForeignKey(
default=wagtail.models.collections.get_root_collection_id,
default=collections.get_root_collection_id,
on_delete=django.db.models.deletion.CASCADE,
related_name="+",
to="wagtailcore.collection",
Expand Down

0 comments on commit 4b2b18e

Please sign in to comment.