Skip to content

Commit 6c9fe25

Browse files
authored
Merge branch 'main' into task/section-footer/cdd-3163
2 parents 49ae412 + c68fea2 commit 6c9fe25

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-4
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by Django 5.2.12 on 2026-03-13 10:59
2+
3+
import wagtail.fields
4+
from django.db import migrations
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
("home", "0030_alter_landingpage_body_date_prefix"),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name="landingpagerelatedlink",
16+
name="body",
17+
field=wagtail.fields.RichTextField(blank=True, null=True),
18+
),
19+
]

cms/home/models/landing_page.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,4 @@ class LandingPageRelatedLink(UKHSAPageRelatedLink):
124124
page = ParentalKey(
125125
LandingPage, on_delete=models.SET_NULL, null=True, related_name="related_links"
126126
)
127+
body = RichTextField(features=[], blank=True, null=True)

requirements-prod.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ filelock==3.25.0
2929
grimp==3.14
3030
gunicorn==25.1.0
3131
html5lib==1.1
32-
identify==2.6.16
32+
identify==2.6.18
3333
idna==3.11
3434
importlib-metadata==8.7.1
3535
inflection==0.5.1
@@ -55,8 +55,8 @@ packaging==26.0
5555
pathspec==1.0.4
5656
pbr==7.0.3
5757
Pillow==12.1.1
58-
platformdirs==4.9.2
59-
plotly==6.5.2
58+
platformdirs==4.9.4
59+
plotly==6.6.0
6060
pluggy==1.6.0
6161
pyparsing==3.3.2
6262
pyrsistent==0.20.0
@@ -71,7 +71,7 @@ ruamel.yaml==0.19.1
7171
ruamel.yaml.clib==0.2.15
7272
SQLAlchemy==2.0.48
7373
scour==0.38.2
74-
setuptools==82.0.0
74+
setuptools==82.0.1
7575
simplejson==3.20.2
7676
six==1.17.0
7777
sortedcontainers==2.4.0

tests/unit/cms/home/test_models.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from wagtail.api.conf import APIField
55

66
from cms.dashboard.models import UKHSAPage
7+
from cms.home.models.landing_page import LandingPageRelatedLink
78
from tests.fakes.factories.cms.landing_page_factory import FakeLandingPageFactory
89

910

@@ -67,6 +68,19 @@ def test_has_correct_content_panels(
6768
# When / Then
6869
assert hasattr(blank_page, expected_content_panel)
6970

71+
def test_landing_page_related_link_body_is_optional(self) -> None:
72+
"""
73+
Given the `LandingPageRelatedLink` model
74+
When inspecting the `body` field
75+
Then the field allows blank and null values
76+
"""
77+
# Given / When
78+
body_field = LandingPageRelatedLink._meta.get_field("body")
79+
80+
# Then
81+
assert body_field.blank is True
82+
assert body_field.null is True
83+
7084
def test_is_previewable_returns_false(self):
7185
"""
7286
Given a blank `LandingPage` model

0 commit comments

Comments
 (0)