Fix bug with updating tasks v0.0.7

This commit is contained in:
TropiiDev 2025-04-28 08:49:58 -04:00
parent cf66a8b50e
commit 8b787309d8

2
api.py
View File

@ -48,6 +48,8 @@ async def update_user_task(task: UpdateTask, session: SessionDep, current_user:
user_data = task.model_dump(exclude_unset=True)
new_task = user_data
if user_db.tasks is None:
user_db.tasks = []
# Filter out the task with matching title and keep all others
updated_tasks = [