From 12a19639fdf63df20d40a476a3a8f9b2d5cab76a Mon Sep 17 00:00:00 2001 From: Rene Fichtmueller Date: Tue, 7 Apr 2026 01:24:15 +0200 Subject: [PATCH] fix: seed script accepts category as fallback for missing type field --- scripts/seed-blog-training-data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/seed-blog-training-data.py b/scripts/seed-blog-training-data.py index 2bd7a6a..e97a7e4 100644 --- a/scripts/seed-blog-training-data.py +++ b/scripts/seed-blog-training-data.py @@ -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