Skip to content

Commit

Permalink
EDEV-96: FIX featured_article on RecordArticlePage (#1615)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored Apr 24, 2024
1 parent 381fc0d commit a3375de
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 5.0.4 on 2024-04-24 09:20
# etna:allowAlterField

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


class Migration(migrations.Migration):

dependencies = [
("articles", "0104_alter_articlepage_body_alter_focusedarticlepage_body"),
("wagtailcore", "0091_remove_revision_submitted_for_moderation"),
]

operations = [
migrations.AlterField(
model_name="recordarticlepage",
name="featured_article",
field=models.ForeignKey(
blank=True,
help_text="Select a page to display in the featured area. This can be an Article, Focused Article or Record Article.",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="wagtailcore.page",
verbose_name="featured article",
),
),
]
8 changes: 6 additions & 2 deletions etna/articles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ class RecordArticlePage(
on_delete=models.SET_NULL,
related_name="+",
help_text=_(
"Select a page to display in the featured area. This can be an Article or Focused Article."
"Select a page to display in the featured area. This can be an Article, Focused Article or Record Article."
),
verbose_name=_("featured article"),
)
Expand Down Expand Up @@ -639,7 +639,11 @@ class Meta:
FieldPanel("featured_highlight_gallery"),
PageChooserPanel(
"featured_article",
["articles.ArticlePage", "articles.FocusedArticlePage"],
[
"articles.ArticlePage",
"articles.FocusedArticlePage",
"articles.RecordArticlePage",
],
),
FieldPanel("promoted_links"),
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Generated by Django 5.0.4 on 2024-04-24 09:20
# etna:allowAlterField

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


class Migration(migrations.Migration):

dependencies = [
(
"collections",
"0055_remove_highlightgallerypage_featured_record_article_and_more",
),
("wagtailcore", "0091_remove_revision_submitted_for_moderation"),
]

operations = [
migrations.AlterField(
model_name="highlightgallerypage",
name="featured_article",
field=models.ForeignKey(
blank=True,
help_text="Select a page to display in the featured area. This can be an Article, Focused Article or Record Article.",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="wagtailcore.page",
verbose_name="featured article",
),
),
]
2 changes: 1 addition & 1 deletion etna/collections/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ class HighlightGalleryPage(TopicalPageMixin, ContentWarningMixin, BasePageWithIn
on_delete=models.SET_NULL,
related_name="+",
help_text=_(
"Select a page to display in the featured area. This can be an Article, Focused Article, or Record Article."
"Select a page to display in the featured area. This can be an Article, Focused Article or Record Article."
),
verbose_name=_("featured article"),
)
Expand Down

0 comments on commit a3375de

Please sign in to comment.