From 6eb333bb015db4f7a51ede065bfe113afa895f99 Mon Sep 17 00:00:00 2001 From: rene Date: Sat, 9 May 2026 20:28:24 +0200 Subject: [PATCH] Fix: KI-Gesundheitsbericht nach Generierung in ki_health_reports speichern --- backend/routes/health.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/routes/health.py b/backend/routes/health.py index 96743e0..b9c1838 100644 --- a/backend/routes/health.py +++ b/backend/routes/health.py @@ -454,6 +454,11 @@ async def ki_zusammenfassung(dog_id: int, user=Depends(get_current_user)): user_is_premium=bool(user.get("is_premium")), user_id=user["id"], ) + with db() as conn: + conn.execute( + "INSERT INTO ki_health_reports (dog_id, bericht) VALUES (?,?)", + (dog_id, result) + ) return {"zusammenfassung": result} except KIPremiumRequired as e: raise HTTPException(402, str(e))