фикс багов, интеграция с фронтом
This commit is contained in:
1 parent
95f87c253c
commit
b2210105cb
55 files changed
+293
-1
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -61,6 +61,10 @@ async def create_schedule(
|
||||
schedule_data = schedule_in.model_dump()
|
||||
schedule_data["user_id"] = current_user.id
|
||||
schedule = await crud_schedule.create(db, schedule_data)
|
||||
|
||||
# Перезагрузить расписание с tasks для корректной сериализации
|
||||
schedule = await crud_schedule.get_with_tasks(db, schedule.id)
|
||||
|
||||
return schedule
|
||||
|
||||
|
||||
@@ -86,6 +90,10 @@ async def update_schedule(
|
||||
|
||||
update_data = schedule_in.model_dump(exclude_unset=True)
|
||||
schedule = await crud_schedule.update(db, schedule, update_data)
|
||||
|
||||
# Перезагрузить расписание с tasks для корректной сериализации
|
||||
schedule = await crud_schedule.get_with_tasks(db, schedule.id)
|
||||
|
||||
return schedule
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user