-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix migrations failures caused by changed revision / initial dependen…
…cy change
- Loading branch information
Showing
2 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
wagtail_localize/migrations/0016_wagtail4_revision_model.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
from wagtail import VERSION as WAGTAIL_VERSION | ||
|
||
|
||
if WAGTAIL_VERSION >= (4, 0): | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("wagtail_localize", "0015_translationcontext_field_path"), | ||
("wagtailcore", "0076_modellogentry_revision"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="TranslationLog", | ||
name="page_revision", | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="+", | ||
to="wagtailcore.Revision", | ||
), | ||
) | ||
] | ||
|
||
else: | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [("wagtail_localize", "0015_translationcontext_field_path")] | ||
|
||
operations = [] |