From 954b6cc06a00f36c1c0ee90460e4c31235ab8b53 Mon Sep 17 00:00:00 2001 From: giles Date: Sat, 21 Feb 2026 22:23:19 +0000 Subject: [PATCH] Set page flag in sync_single_page to ensure is_page=true Ghost /pages/ endpoint may not include "page": true in the response. Explicitly set it so _upsert_post correctly marks is_page=true. Co-Authored-By: Claude Opus 4.6 --- bp/blog/ghost/ghost_sync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bp/blog/ghost/ghost_sync.py b/bp/blog/ghost/ghost_sync.py index 4e458eb..669dd80 100644 --- a/bp/blog/ghost/ghost_sync.py +++ b/bp/blog/ghost/ghost_sync.py @@ -1021,6 +1021,8 @@ async def sync_single_post(sess: AsyncSession, ghost_id: str) -> None: async def sync_single_page(sess: AsyncSession, ghost_id: str) -> None: gp = await fetch_single_page_from_ghost(ghost_id) + if gp is not None: + gp["page"] = True # Ghost /pages/ endpoint may omit this flag if gp is None: res = await sess.execute(select(Post).where(Post.ghost_id == ghost_id)) obj = res.scalar_one_or_none()