fix: seed script accepts category as fallback for missing type field

This commit is contained in:
Rene Fichtmueller 2026-04-07 01:24:15 +02:00
parent f5c714d58c
commit 633478595b

View File

@ -93,12 +93,12 @@ def parse_article(filepath: Path) -> dict | None:
return m.group(1).strip() if m else ""
title = fm_get("title")
topic = fm_get("type")
topic = fm_get("type") or fm_get("category") or "analysis"
target_audience = fm_get("target_audience")
score_str = fm_get("score")
if not title or not topic or not body:
print(f" SKIP {filepath.name}: missing title/type/body")
if not title or not body:
print(f" SKIP {filepath.name}: missing title/body")
return None
# Build input_text: the generation request