From 3f6240b6bd9c2e0bef6cb9ff130c7e021841b196 Mon Sep 17 00:00:00 2001 From: jessikitty Date: Wed, 4 Feb 2026 13:41:14 +1100 Subject: [PATCH] Fix: Add missing assignment_type field to chore API response Fixed get_chore_with_assignments() to include assignment_type in dict. This resolves the ResponseValidationError where assignment_type was missing from API responses despite being present in the database. --- backend/app/api/v1/chores.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/app/api/v1/chores.py b/backend/app/api/v1/chores.py index c3caf87..3cd6e59 100644 --- a/backend/app/api/v1/chores.py +++ b/backend/app/api/v1/chores.py @@ -40,6 +40,7 @@ def get_chore_with_assignments(db: Session, chore: Chore) -> dict: "id": user.id, "username": user.username, "full_name": user.full_name, + "avatar_url": user.avatar_url, "birthday": user.birthday, "completed_at": assignment.completed_at }) @@ -52,6 +53,8 @@ def get_chore_with_assignments(db: Session, chore: Chore) -> dict: "room": chore.room, "frequency": chore.frequency, "points": chore.points, + "image_url": chore.image_url, + "assignment_type": chore.assignment_type, "status": chore.status, "due_date": chore.due_date, "completed_at": chore.completed_at,