fix(ingestion): preserve article workflow data and skip closed items on re-import

This commit is contained in:
Oliver 2026-02-21 14:51:36 +01:00
parent b0f995d5c9
commit 93f52f72b9
No known key found for this signature in database
3 changed files with 206 additions and 31 deletions

View file

@ -633,6 +633,13 @@ def _resolve_existing_article_id(payload: ArticleUpsert) -> int | None:
return None
def find_existing_article_for_upsert(payload: ArticleUpsert) -> dict[str, Any] | None:
article_id = _resolve_existing_article_id(payload)
if article_id is None:
return None
return get_article_by_id(article_id)
def upsert_article(payload: ArticleUpsert) -> int:
existing_id = _resolve_existing_article_id(payload)
with get_conn() as conn: