Skip to content

Commit 46ce745

Browse files
Post-merge fixes: Wagtail API arg order, turnstile rename, alembic merge head
- place/portal generateMetadata used the legacy getCMSContent(slug, lang, type) arg order and published_content shape; align with the Wagtail client - TestReviewTagScoping still sent recaptcha_token (renamed to turnstile_token on dev) - test_config monkeypatched ACCOUNT_ID, which no longer exists in Settings - alembic merge revision for the dev + wagtail-cutover heads Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent add07bb commit 46ce745

5 files changed

Lines changed: 31 additions & 6 deletions

File tree

app/src/app/(static)/place/[slug]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export const revalidate = 3600;
1212
export async function generateMetadata({params}: {params: Promise<{slug: string}>}) {
1313
const [{slug}, userCookies] = await Promise.all([params, cookies()]);
1414
const language = userCookies.get('language')?.value ?? 'en';
15-
const cmsData = await getCMSContent(slug, language, 'places').catch(() => null);
16-
const title = cmsData?.content?.published_content?.title;
15+
const cmsData = await getCMSContent('places', slug, language).catch(() => null);
16+
const title = cmsData?.content?.title;
1717
return title ? {title, description: `Draw and explore districting maps for ${title}`} : {};
1818
}
1919

app/src/app/(static)/portal/[slug]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export const revalidate = 3600;
1111
export async function generateMetadata({params}: {params: Promise<{slug: string}>}) {
1212
const [{slug}, userCookies] = await Promise.all([params, cookies()]);
1313
const language = userCookies.get('language')?.value ?? 'en';
14-
const cmsData = await getCMSContent(slug, language, 'tags').catch(() => null);
15-
const title = cmsData?.content?.published_content?.title;
14+
const cmsData = await getCMSContent('tags', slug, language).catch(() => null);
15+
const title = cmsData?.content?.title;
1616
return title ? {title} : {};
1717
}
1818

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""merge dev and wagtail-cutover heads
2+
3+
Revision ID: ba6fafe520dc
4+
Revises: a1c4d2e9b7f3, a30db9686b7c
5+
Create Date: 2026-08-04 19:06:23.398536
6+
7+
"""
8+
from typing import Sequence, Union
9+
10+
from alembic import op
11+
import sqlalchemy as sa
12+
13+
14+
# revision identifiers, used by Alembic.
15+
revision: str = 'ba6fafe520dc'
16+
down_revision: Union[str, None] = ('a1c4d2e9b7f3', 'a30db9686b7c')
17+
branch_labels: Union[str, Sequence[str], None] = None
18+
depends_on: Union[str, Sequence[str], None] = None
19+
20+
21+
def upgrade() -> None:
22+
pass
23+
24+
25+
def downgrade() -> None:
26+
pass

backend/tests/test_comments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ def _make_comment(self, client, title: str, tags: list[str]) -> dict:
14411441
"commenter": {"first_name": "Scoped", "email": "scoped@example.com"},
14421442
"comment": {"title": title, "comment": f"{title} body."},
14431443
"tags": [{"tag": tag} for tag in tags],
1444-
"recaptcha_token": "test_token",
1444+
"turnstile_token": "test_token",
14451445
}
14461446
response = client.post("/api/comments/submit", json=form_data)
14471447
assert response.status_code == 201

backend/tests/test_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def test_get_s3_client_static_keys_take_precedence(monkeypatch):
5454
monkeypatch.setattr(settings, "AWS_ACCESS_KEY_ID", "test-key")
5555
monkeypatch.setattr(settings, "AWS_SECRET_ACCESS_KEY", "test-secret")
5656
monkeypatch.setattr(settings, "AWS_USE_DEFAULT_CREDENTIALS", True)
57-
monkeypatch.setattr(settings, "ACCOUNT_ID", None)
5857

5958
client = settings.get_s3_client()
6059

0 commit comments

Comments
 (0)