Fix bug with updating tasks v0.0.7
This commit is contained in:
parent
cf66a8b50e
commit
8b787309d8
2
api.py
2
api.py
@ -48,6 +48,8 @@ async def update_user_task(task: UpdateTask, session: SessionDep, current_user:
|
|||||||
user_data = task.model_dump(exclude_unset=True)
|
user_data = task.model_dump(exclude_unset=True)
|
||||||
|
|
||||||
new_task = user_data
|
new_task = user_data
|
||||||
|
if user_db.tasks is None:
|
||||||
|
user_db.tasks = []
|
||||||
|
|
||||||
# Filter out the task with matching title and keep all others
|
# Filter out the task with matching title and keep all others
|
||||||
updated_tasks = [
|
updated_tasks = [
|
||||||
|
Loading…
Reference in New Issue
Block a user