Skip to content

Commit

Permalink
allow default promote image if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvolo committed Jul 25, 2024
1 parent 089a283 commit 13f8a0b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions pages/migrations/0137_alter_rootpage_promote_image.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 5.0.7 on 2024-07-25 02:04

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("pages", "0136_alter_rootpage_layout"),
("wagtailimages", "0025_alter_image_file_alter_rendition_file"),
]

operations = [
migrations.AlterField(
model_name="rootpage",
name="promote_image",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="wagtailimages.image",
),
),
]
2 changes: 1 addition & 1 deletion pages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class RootPage(Page):
promote_image = models.ForeignKey(
'wagtailimages.Image',
null=True,
blank=False,
blank=True,
on_delete=models.SET_NULL,
related_name='+'
)
Expand Down

0 comments on commit 13f8a0b

Please sign in to comment.