From 7e81f6ed8859b4510c5757eadb1e764bef643c18 Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Mon, 26 Jan 2026 05:45:52 +0200 Subject: [PATCH] Fix db_utils --- backend/db_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/db_utils.py b/backend/db_utils.py index 34c5a62..ba4670e 100644 --- a/backend/db_utils.py +++ b/backend/db_utils.py @@ -81,9 +81,9 @@ def update_recipe_db(recipe_id: int, recipe_data: Dict[str, Any]) -> Optional[Di SET name = %s, meal_type = %s, time_minutes = %s, - tags = %s, - ingredients = %s, - steps = %s, + tags = %s::jsonb, + ingredients = %s::jsonb, + steps = %s::jsonb, image = %s, made_by = %s WHERE id = %s @@ -136,7 +136,7 @@ def create_recipe_db(recipe_data: Dict[str, Any]) -> Dict[str, Any]: cur.execute( """ INSERT INTO recipes (name, meal_type, time_minutes, tags, ingredients, steps, image, made_by, user_id) - VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s) + VALUES (%s, %s, %s, %s::jsonb, %s::jsonb, %s::jsonb, %s, %s, %s) RETURNING id, name, meal_type, time_minutes, tags, ingredients, steps, image, made_by, user_id """, (