Set page flag in sync_single_page to ensure is_page=true
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 56s

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 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-21 22:23:19 +00:00
parent 85acc68840
commit 954b6cc06a

View File

@@ -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()